<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Troubleshooting on kenji.blog</title><link>http://kenji.blog/en/categories/troubleshooting/</link><description>Recent content in Troubleshooting on kenji.blog</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>kenjinote</copyright><lastBuildDate>Sun, 13 Sep 2026 05:00:00 +0900</lastBuildDate><atom:link href="http://kenji.blog/en/categories/troubleshooting/index.xml" rel="self" type="application/rss+xml"/><item><title>Advanced Windows Troubleshooting using Sysinternals Tools</title><link>http://kenji.blog/en/p/sysinternals-advanced-windows-troubleshooting/</link><pubDate>Sun, 13 Sep 2026 05:00:00 +0900</pubDate><guid>http://kenji.blog/en/p/sysinternals-advanced-windows-troubleshooting/</guid><description>&lt;img src="http://kenji.blog/p/sysinternals-advanced-windows-troubleshooting/img/eyecatch.jpg" alt="Featured image of post Advanced Windows Troubleshooting using Sysinternals Tools" />&lt;p>When facing problems in a Windows environment, such as system crashes, performance degradation, malware infections, or inexplicable application behavior, the built-in Task Manager and Event Viewer are often insufficient to identify the Root Cause. In such advanced troubleshooting, IT professionals, incident responders, and system administrators worldwide rely on the &amp;ldquo;&lt;strong>Windows Sysinternals&lt;/strong>&amp;rdquo; suite of tools.&lt;/p>
&lt;p>In this article, we will thoroughly explain advanced troubleshooting techniques that delve into the depths of the Windows OS (the boundary between kernel mode and user mode, interrupt processing, ETW, registry/file system drivers) by fully utilizing the core Sysinternals tools: &lt;strong>Process Explorer&lt;/strong>, &lt;strong>Process Monitor (ProcMon)&lt;/strong>, &lt;strong>Autoruns&lt;/strong>, and &lt;strong>TCPView&lt;/strong>.&lt;/p>
&lt;hr>
&lt;h2 id="1-sysinternals-tools-architecture-and-windows-kernel-basics">1. Sysinternals Tools Architecture and Windows Kernel Basics
&lt;/h2>&lt;p>To understand why the Sysinternals suite is so powerful, it is necessary to grasp the basic concepts of Windows architecture. Windows broadly operates on two privilege levels: &amp;ldquo;User Mode (Ring 3)&amp;rdquo; and &amp;ldquo;Kernel Mode (Ring 0)&amp;rdquo;.&lt;/p>
&lt;p>Tools like Process Monitor and Process Explorer do not merely call user-mode APIs; they dynamically load dedicated kernel-mode drivers (e.g., &lt;code>PROCMON24.SYS&lt;/code>) to hook or trace events occurring deep within the OS directly.&lt;/p>
&lt;p>The following architecture diagram shows how Process Monitor captures file system activity.&lt;/p>
&lt;pre class="mermaid">
flowchart TD
A[&amp;#34;User Application (Ring 3)&amp;#34;] --&amp;gt; B[&amp;#34;ntdll.dll (Native API)&amp;#34;]
B --&amp;gt; C[&amp;#34;Syscall / sysenter instruction&amp;#34;]
C --&amp;gt; D[&amp;#34;ntoskrnl.exe (Kernel Mode / Ring 0)&amp;#34;]
D --&amp;gt; E[&amp;#34;I/O Manager&amp;#34;]
E --&amp;gt; F[&amp;#34;Filter Manager (FltMgr.sys)&amp;#34;]
F --&amp;gt; G[&amp;#34;PROCMON24.SYS (ProcMon Filter Driver)&amp;#34;]
G --&amp;gt; H[&amp;#34;File System Driver (NTFS.sys)&amp;#34;]
G --&amp;gt; I[&amp;#34;ProcMon GUI (Event Logging)&amp;#34;]
&lt;/pre>
&lt;p>ProcMon&amp;rsquo;s driver registers as a minifilter driver and monitors all IRPs (I/O Request Packets) passing between the I/O Manager and the NTFS driver. This allows it to uncover all accesses, even those an application tries to hide.&lt;/p>
&lt;hr>
&lt;h2 id="2-process-deep-dive-and-malware-analysis-with-process-explorer-procexp">2. Process Deep Dive and Malware Analysis with Process Explorer (ProcExp)
&lt;/h2>&lt;p>Process Explorer is a &amp;ldquo;supercharged Task Manager.&amp;rdquo; It visualizes not just CPU/memory usage, but also process trees, handles, loaded DLLs, and thread call stacks.&lt;/p>
&lt;h3 id="21-identifying-handle-leaks-and-locks">2.1 Identifying Handle Leaks and Locks
&lt;/h3>&lt;p>A common issue occurs when an application crashes while keeping a file open, preventing the file from being subsequently deleted or moved. When you get the error &amp;ldquo;The file is open in another program,&amp;rdquo; use ProcExp&amp;rsquo;s &lt;strong>Find&lt;/strong> feature (&lt;code>Ctrl+F&lt;/code>) to search for the file or directory name.
Once you identify the process holding the corresponding handle (File, Section, Mutex, Event, etc.), you can right-click the target process and forcefully execute &lt;code>Close Handle&lt;/code> to release the file lock without killing the process (however, be aware of the risk that the app&amp;rsquo;s behavior may become unstable).&lt;/p>
&lt;h3 id="22-identifying-malware-hooks-and-verifying-signatures">2.2 Identifying Malware Hooks and Verifying Signatures
&lt;/h3>&lt;p>When malware or an unauthorized rootkit is lurking in the system, it may inject its own DLL (DLL Injection) into legitimate processes (e.g., &lt;code>svchost.exe&lt;/code>, &lt;code>explorer.exe&lt;/code>).&lt;/p>
&lt;p>In ProcExp, you can highlight unauthorized processes by enabling the following settings:&lt;/p>
&lt;ol>
&lt;li>&lt;strong>Options&lt;/strong> -&amp;gt; &lt;strong>Verify Image Signatures&lt;/strong>: Verifies the digital signatures of executables and DLLs. Unsigned files or files with broken signatures are highlighted.&lt;/li>
&lt;li>&lt;strong>Options&lt;/strong> -&amp;gt; &lt;strong>VirusTotal.com&lt;/strong> -&amp;gt; &lt;strong>Check VirusTotal.com&lt;/strong>: Automatically sends the hash values of all processes to VirusTotal and displays the malware detection rate (e.g., &lt;code>5/72&lt;/code>) as a score.&lt;/li>
&lt;/ol>
&lt;p>If a suspicious &lt;code>svchost.exe&lt;/code> is found, double-click the process, check the &lt;strong>Strings&lt;/strong> tab, and look for differences between the strings in Memory and on Disk (Image). If the difference is significant, it is highly likely that the executable is Packed or has fallen victim to Process Hollowing.&lt;/p>
&lt;h3 id="23-analyzing-hardware-interrupts-and-100-cpu-spikes">2.3 Analyzing Hardware Interrupts and 100% CPU Spikes
&lt;/h3>&lt;p>If the entire system freezes for a few seconds or audio stutters, checking the Task Manager might show &amp;ldquo;System Interrupts&amp;rdquo; consuming the CPU.&lt;/p>
&lt;p>In Windows scheduling, hardware interrupts (ISR: Interrupt Service Routine) and DPCs (Deferred Procedure Call) execute at a higher priority (IRQL: Interrupt Request Level) than normal user threads. In other words, if a faulty driver prolongs a DPC, the CPU cannot execute any other tasks on that core.&lt;/p>
&lt;p>If the CPU usage of &lt;code>Interrupts&lt;/code> or &lt;code>DPCs&lt;/code> at the top of the ProcExp process list is high, use it in conjunction with the Windows Performance Analyzer (WPA) to identify the driver (&lt;code>.sys&lt;/code>) causing it. CPU time calculation can be formulated as follows:&lt;/p>
$$ U_{cpu} = \left( 1 - \frac{T_{idle}}{T_{total}} \right) \times 100 $$$$ T_{interrupt\_overhead} = \sum_{i=1}^{n} \left( T_{ISR(i)} + T_{DPC(i)} \right) $$&lt;p>If $T_{interrupt\_overhead}$ accounts for most of the CPU time, a bug in an NDIS driver (network), Storport driver (storage), or graphics driver is suspected.&lt;/p>
&lt;hr>
&lt;h2 id="3-ultra-precision-tracing-with-process-monitor-procmon">3. Ultra-Precision Tracing with Process Monitor (ProcMon)
&lt;/h2>&lt;p>Process Monitor records file system, registry, network, and process/thread creation activity at the microsecond level. It is the most powerful tool for troubleshooting, but because running it for just a few minutes logs millions of events, the challenge becomes &amp;ldquo;how to filter the noise.&amp;rdquo;&lt;/p>
&lt;h3 id="31-advanced-filtering-methodology">3.1 Advanced Filtering Methodology
&lt;/h3>&lt;p>The basic workflow for mastering ProcMon is shown in the following Mermaid diagram.&lt;/p>
&lt;pre class="mermaid">
flowchart TD
A[&amp;#34;Start ProcMon Capture&amp;#34;] --&amp;gt; B[&amp;#34;Reproduce the Target Issue&amp;#34;]
B --&amp;gt; C[&amp;#34;Stop Capture (Ctrl+E)&amp;#34;]
C --&amp;gt; D[&amp;#34;Filter: Exclude &amp;#39;Result IS SUCCESS&amp;#39;&amp;#34;]
D --&amp;gt; E[&amp;#34;Filter: &amp;#39;Process Name&amp;#39; IS &amp;#39;target.exe&amp;#39;&amp;#34;]
E --&amp;gt; F[&amp;#34;Analyze &amp;#39;NAME NOT FOUND&amp;#39; (Missing Files/Keys)&amp;#34;]
F --&amp;gt; G[&amp;#34;Identify Root Cause (DLL Hijacking, Missing Dependency)&amp;#34;]
E --&amp;gt; H[&amp;#34;Analyze &amp;#39;ACCESS DENIED&amp;#39;&amp;#34;]
H --&amp;gt; I[&amp;#34;Check NTFS Permissions / Integrity Levels / UAC&amp;#34;]
&lt;/pre>
&lt;p>&lt;strong>Utilizing the Drop Filter:&lt;/strong>
By enabling &lt;code>Filter&lt;/code> -&amp;gt; &lt;code>Drop Filtered Events&lt;/code>, filtered events are no longer saved to memory or disk. This prevents ProcMon from crashing due to Out of Memory (OOM) errors even during long traces (e.g., monitoring intermittent issues).&lt;/p>
&lt;h3 id="32-practical-scenario-debugging-dll-load-failures-side-loading--missing-dll">3.2 Practical Scenario: Debugging DLL Load Failures (Side-Loading / Missing DLL)
&lt;/h3>&lt;p>Consider a case where a business application &lt;code>AppServer.exe&lt;/code> terminates abnormally (silent crash) immediately after launch without displaying any error dialog. There is no useful information in the Event Viewer (Application log) either.&lt;/p>
&lt;ol>
&lt;li>Launch ProcMon and start capture.&lt;/li>
&lt;li>Launch &lt;code>AppServer.exe&lt;/code> and cause it to crash.&lt;/li>
&lt;li>Stop ProcMon capture.&lt;/li>
&lt;li>Set filter: &lt;code>Process Name is AppServer.exe&lt;/code>.&lt;/li>
&lt;li>Set filter: &lt;code>Result is not SUCCESS&lt;/code>.&lt;/li>
&lt;/ol>
&lt;p>Analyzing the logs, you should find a sequence of events like the following:&lt;/p>
&lt;ul>
&lt;li>&lt;code>CreateFile&lt;/code> | &lt;code>C:\Program Files\MyApp\lib\CoreCrypto.dll&lt;/code> | &lt;code>NAME NOT FOUND&lt;/code>&lt;/li>
&lt;li>&lt;code>CreateFile&lt;/code> | &lt;code>C:\Windows\System32\CoreCrypto.dll&lt;/code> | &lt;code>NAME NOT FOUND&lt;/code>&lt;/li>
&lt;li>&lt;code>CreateFile&lt;/code> | &lt;code>C:\Windows\CoreCrypto.dll&lt;/code> | &lt;code>NAME NOT FOUND&lt;/code>&lt;/li>
&lt;li>&lt;code>CreateFile&lt;/code> | &lt;code>C:\Users\Kenji\AppData\Local\Microsoft\WindowsApps\CoreCrypto.dll&lt;/code> | &lt;code>NAME NOT FOUND&lt;/code>&lt;/li>
&lt;/ul>
&lt;p>This is typical behavior for &lt;strong>Missing DLL Dependencies&lt;/strong> and the &lt;strong>DLL Search Order&lt;/strong>. The application requires &lt;code>CoreCrypto.dll&lt;/code>, but because it does not exist anywhere on the system, initialization fails, and the application terminates without an exception handler. Placing the missing DLL in the appropriate directory resolves this issue immediately.&lt;/p>
&lt;h3 id="33-troubleshooting-boot-failures-with-boot-logging">3.3 Troubleshooting Boot Failures with Boot Logging
&lt;/h3>&lt;p>If Windows boot is slow or results in a black screen immediately after login, ProcMon&amp;rsquo;s &lt;strong>Enable Boot Logging&lt;/strong> feature is useful. By enabling this and restarting, ProcMon&amp;rsquo;s dedicated boot driver records all system calls from the earliest stages of Windows (when &lt;code>smss.exe&lt;/code> is loaded) and saves them to a file. When you open ProcMon upon the next login, the log is converted, allowing you to perform a detailed analysis of which drivers or services are causing I/O bottlenecks during the boot process.&lt;/p>
$$ \text{Throughput (MB/s)} = \frac{\sum_{i=1}^{N} \text{Size}(I/O_i)}{\Delta T_{capture}} \times \frac{1}{1024^2} $$&lt;p>
Using ProcMon&amp;rsquo;s &lt;code>Tools&lt;/code> -&amp;gt; &lt;code>File Summary&lt;/code>, you can instantly perform this aggregation on the GUI.&lt;/p>
&lt;hr>
&lt;h2 id="4-analyzing-persistence-mechanisms-and-boot-delays-with-autoruns">4. Analyzing Persistence Mechanisms and Boot Delays with Autoruns
&lt;/h2>&lt;p>Windows auto-start locations are not limited to just the Startup Folder or the &lt;code>Run&lt;/code> registry key. Malware (especially advanced rootkits and APT payloads) configures itself to execute after a reboot (Persistence) by hiding in places that system administrators are less likely to notice.&lt;/p>
&lt;p>Autoruns exhaustively scans &lt;strong>all Auto-Start Extensibility Points (ASEs)&lt;/strong> on the system.&lt;/p>
&lt;pre class="mermaid">
flowchart LR
A[&amp;#34;System Boot / Logon Sequence&amp;#34;] --&amp;gt; B[&amp;#34;Boot Execute (smss.exe)&amp;#34;]
B --&amp;gt; C[&amp;#34;Services &amp;amp; Drivers (services.exe)&amp;#34;]
B --&amp;gt; D[&amp;#34;LSA Providers / WDigest (lsass.exe)&amp;#34;]
B --&amp;gt; E[&amp;#34;User Logon (Winlogon.exe)&amp;#34;]
E --&amp;gt; F[&amp;#34;Explorer &amp;amp; Run Keys&amp;#34;]
F --&amp;gt; G[&amp;#34;Scheduled Tasks &amp;amp; WMI&amp;#34;]
G --&amp;gt; H[&amp;#34;Autoruns Complete Scan Scope&amp;#34;]
&lt;/pre>
&lt;h3 id="41-important-tabs-to-check-and-advanced-features">4.1 Important Tabs to Check and Advanced Features
&lt;/h3>&lt;ul>
&lt;li>&lt;strong>Logon&lt;/strong>: Standard Run/RunOnce keys and the Startup folder.&lt;/li>
&lt;li>&lt;strong>Scheduled Tasks&lt;/strong>: Windows Task Scheduler. Malware often creates fake tasks disguised as &amp;ldquo;Adobe Update&amp;rdquo; or &amp;ldquo;Google Update.&amp;rdquo;&lt;/li>
&lt;li>&lt;strong>Services / Drivers&lt;/strong>: Drivers that start in kernel mode. Here, you can disable the suspicious &lt;code>.sys&lt;/code> files causing the 100% CPU spikes mentioned earlier.&lt;/li>
&lt;li>&lt;strong>WMI&lt;/strong>: Persistence locations for Fileless Malware utilizing WMI (Windows Management Instrumentation) event filters and consumers. These are very often overlooked.&lt;/li>
&lt;li>&lt;strong>AppInit_DLLs / KnownDLLs&lt;/strong>: A list of DLLs forcibly injected every time an application launches. It becomes a hotbed for hooks via DLL injection.&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Troubleshooting in Practice:&lt;/strong>
In Autoruns, similar to ProcExp, enable &lt;code>Verify Code Signatures&lt;/code> and &lt;code>Check VirusTotal.com&lt;/code> from &lt;code>Options&lt;/code>. If you find entries highlighted in pink (unsigned or unknown publisher) or entries with a red VirusTotal score in the list, you can safely disable their startup by simply unchecking the box without deleting the registry. A standard analytical approach is to perform A/B testing by restarting to see if the issue (malware behavior or blue/black screens) is resolved.&lt;/p>
&lt;hr>
&lt;h2 id="5-tracking-hidden-network-connections-with-tcpview">5. Tracking Hidden Network Connections with TCPView
&lt;/h2>&lt;p>While you can check the network status in the Task Manager&amp;rsquo;s Network tab or with the &lt;code>netstat -ano&lt;/code> command, updates are slow, and manually mapping PIDs to process names is tedious.
TCPView monitors all TCP and UDP endpoints in real-time, listing which processes are communicating with which remote addresses and ports.&lt;/p>
&lt;h3 id="51-identifying-unauthorized-c2-communications">5.1 Identifying Unauthorized C2 Communications
&lt;/h3>&lt;p>If malware has installed a backdoor and is sending Beacons to an external C2 (Command and Control) server, look for the following characteristics in TCPView:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Unnatural Process Names&lt;/strong>: For example, a process named &lt;code>svchost.exe&lt;/code> operating with user privileges instead of system privileges, and maintaining communication in an &lt;code>ESTABLISHED&lt;/code> state with an unfamiliar overseas IP address.&lt;/li>
&lt;li>&lt;strong>Communication from Processes that Normally Don&amp;rsquo;t Communicate&lt;/strong>: For instance, Calculator (&lt;code>calc.exe&lt;/code>) or Notepad (&lt;code>notepad.exe&lt;/code>) sending and receiving large numbers of packets on port 443 or 80 (a typical sign of Process Hollowing).&lt;/li>
&lt;/ul>
&lt;p>If you spot suspicious communication, you can forcefully close the TCP session (issuing an RST packet) by sending &lt;code>Close Connection&lt;/code> directly from TCPView, or forcefully terminate the corresponding process with &lt;code>End Process&lt;/code>.&lt;/p>
&lt;hr>
&lt;h2 id="6-conclusion-the-essence-of-analysis-with-sysinternals">6. Conclusion: The Essence of Analysis with Sysinternals
&lt;/h2>&lt;p>The Sysinternals suite of tools serves as a powerful &amp;ldquo;X-ray&amp;rdquo; that visualizes all the underlying behaviors of the Windows OS. To use these tools effectively, adhere to the following best practices:&lt;/p>
&lt;ol>
&lt;li>&lt;strong>Configuring Symbols&lt;/strong>:
To accurately resolve call stacks in ProcExp and ProcMon, it is mandatory to configure Microsoft&amp;rsquo;s public symbol server. Set the following environment variable:
&lt;code>_NT_SYMBOL_PATH = srv*c:\symbols*https://msdl.microsoft.com/download/symbols&lt;/code>&lt;/li>
&lt;li>&lt;strong>Improving the Signal-to-Noise Ratio&lt;/strong>:
ProcMon logs span millions of lines. Actively use the &lt;code>Exclude&lt;/code> filter to remove &amp;ldquo;normal behaviors (SUCCESS)&amp;rdquo; and &amp;ldquo;known safe processes (System, explorer.exe, etc.)&amp;rdquo;, and focus on the core of the issue (ACCESS DENIED, NAME NOT FOUND).&lt;/li>
&lt;li>&lt;strong>Always Use the Latest Version&lt;/strong>:
Sysinternals tools are frequently updated. Access &lt;code>https://live.sysinternals.com/&lt;/code> directly from your browser to always use the latest binaries (or command-line versions like &lt;code>procdump&lt;/code>, &lt;code>psexec&lt;/code>, etc.).&lt;/li>
&lt;/ol>
&lt;p>In advanced Windows troubleshooting, intuition and guesswork are meaningless. By conducting a logical root cause analysis based on facts (processes, threads, handles, system calls, registry events) using Sysinternals tools, you will invariably be able to get to the root cause, no matter how complex the failure or how obscure the malware infection.&lt;/p></description></item></channel></rss>