Enumerating COM Objects and their Methods
Last updated
Last updated
This is a quick note to capture some of the commands for finding interesting COM objects and the methods they expose, based on the great article from Fireeye.
The Microsoft Component Object Model (COM) is a platform-independent, distributed, object-oriented system for creating binary software components that can interact
https://docs.microsoft.com/en-us/windows/win32/com/the-component-object-model
This is less of a post-exploitation technique, rather a method that allows one to look for interesting COM objects, that could be leveraged by one's malware.
We can find all the COM objects registered on the Windows system with:
Once we have the list of COM objects and have identified an interesting COM object, we can now check the methods it exposes. In our case, let's pick a COM object WScript.Shell.1
and check its methods like so:
Below are the methods exposed by WScript.Shell.1
COM object, one of which is RegRead
:
Let's see if we can read a registry value with RedRead
method exposed by the WScript.Shell.1
. RedRead
accepts one string as an argument - a path to the registry value:
Below shows how a registry value was read successfully:
We can iterate through all the COM objects and list their methods and save it all to a text file that we can later on inspect for any other interesting methods:
Below shows the output file with all the methods of all COM objects exposed, in focus are the methods for Shell.Application.1
COM object: