branw.xyz

All Software Posts

Customizing OneNote 16's Custom Pens

Microsoft’s OneNote is an incredibly useful tool for note organization, and with the advent of 2-in-1 devices, digital inking. I have personally been using the Android version with an active stylus and recently moved over to Windows, only to realize that the default pen colors and sizes are slightly different. For the sake of consistency between notes, I was interested in tweaking these settings to be reasonable similar across versions. Unfortunately, there did not appear to be any OneNote extensions or programs for accomplishing this easily.

This write-up describes the process of discovering where the values are persistently stored and how they can be conveniently modified.

XORing Strings in the Twenty-First Century

When attempting to remain out of sight from string-reliant detection systems, whether it be anti-cheat engines or even just the novice reverse engineer, XORing is a commonly used technique. This is not a new-fangled technique by far and truly only serves to defeat naïve static analysis; not only can the cipher text be trivially decoded by hand, but the plaintext is stored as clear as day in memory after first use. Rather, this is a way to escape signature scans of, e.g., .rodata.

Such techniques have been employed for quite a while in regard to mainly unsavory programs, including malware and game cheats. Traditionally, this involved a pseudo-preprocessor build step that would replace wrapped strings with encoded equivalents and include a runtime decoding function. With the advent of C++11 and modern template intricacies however, it is now possible to carry out this encoding process at compile-time without any external tooling.