kartopk.blogg.se

Sysinternals procmon
Sysinternals procmon





But what about the last 3 bytes which are different? Well, 123456 in hex is 01E290 is 08AA52 which we can see stored in those last 3 different bytes, albeit in little endian format. Which instantly gave me hope that what I was trying to accomplish was achievable since there were only nine differences and being the sad geek that I am from my 6502 hand assembly days on Commodore computers, I already knew that hex 31 is the ASCII code for the number 1, hex 32 is 2 and so on so that the first six rows of the first column were representing the PID 123456 and the second column 567890. exe to the end of the command since “fc” is a built-in alias for the Format-Custom cmdlet which is not what we want to call. Note that when calling this from PowerShell, you must append the. To perform a binary comparison, I used the built-in Windows File Compare utility fc.exe. In terms of the filter parameters they contained, they were identical except one was for a PID of 123456 and the other for a PID 567890, e.g: In order to see if it was feasible to take an existing procmon configuration file containing a PID filter and change it, I performed a binary comparison between two configuration files I had manually saved from the procmon user interface.

sysinternals procmon sysinternals procmon

Isolating the Relevant Section of the Configuration File I therefore set about trying to figure out how I could add a process id (PID) filter for a specific process via a script and I present the research and relevant script parts here for the benefit of others. Of course, one could run it without a filter but that will make for potentially much larger trace files, which could impact free disk space and performance and would take longer to process in PowerShell. Indeed, web searches showed others looking for ways to dynamically create these configuration files, which contain the filters as well as included columns, but apparently without success.

sysinternals procmon

Searching around, I found that the format of a procmon configuration (.pmc) file didn’t appear to be documented anywhere and, being a binary format, could prove tricky, and time-consuming, to fully reverse engineer.

sysinternals procmon

I recently had the need to automate the use of SysInternals’ Process Monitor such that no manual intervention is required to initiate the capture, with a filter, and then to process the results, in PowerShell of course.







Sysinternals procmon