“Registry Run Keys: The Secret Sauce of Persistent Malware!”

Paritosh
InfoSec Write-ups
Published in
3 min readMay 4, 2023

--

Welcome to the wonderful world of registry run keys, the magical ingredient that makes persistent malware possible! You might think that these boring registry entries are just harmless bits of information, but in the hands of a crafty hacker, they can turn your computer into a zombie slave that does their bidding.

So what are registry run keys, you ask?

Well, they’re just a little something-something that tells your computer to automatically run a program or process every time it boots up. Nothing to worry about, right? WRONG! Because if a malicious program manages to sneak its way into your registry run keys, it can launch itself every time you start your computer, without you even realizing it.

Photo by Ilya Pavlov on Unsplash

But wait, it gets better!

Not only can malware use registry run keys to maintain persistence, but it can also disguise itself as a legitimate program by using the same keys that other programs use. So when you see a program you recognize in your registry run keys, you might think it’s harmless, when in fact it’s a sneaky little malware beast in disguise.

There are several registry run keys that are commonly used for this purpose, including:

Some paths in the Windows Registry, which is a hierarchical database that stores configuration settings and options for the Windows operating system and its installed applications.

A brief explanation of each path:

1. HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run
-> Contains a list of programs that are set to automatically start when a particular user logs into their account on the computer.

2. HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Runonce
-> Contains a list of programs that are set to run only once when a particular user logs into their account on the computer.

3. HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run
-> Contains a list of programs that are set to automatically start when any user logs into the computer.

4. HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnce
-> Contains a list of programs that are set to run only once when any user logs into the computer.

5. HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnceEx
-> Similar to the above but for more complex installations.

6. HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
-> Stores the locations of important user folders such as Documents, Downloads, and Desktop.

7. HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders
-> Contains information about the location of important system folders, such as the Temporary Internet Files folder.

8. HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders
-> Similar to the above but for all users of the computer.

But fear not, dear reader, for there is hope!

By keeping an eye on your registry run keys and regularly checking for suspicious entries, you can keep those pesky malware monsters at bay. Just make sure you don’t accidentally delete a crucial system file in the process, or you’ll be in for a world of hurt.

So there you have it, folks: the secret sauce of persistent malware. Just remember, the next time you’re staring at your boring old registry run keys, that they’re actually a ticking time bomb of potential computer destruction.

Happy computing!

I hope you found this blog informative !
I’d love to hear your thoughts on the topic, and if you have any questions or comments, feel free to share them in the comments section below.

Thank you for reading, and stay safe out there!”

--

--