2.13. Object Manager – Kernel objects¶
The ObjectManager instance is accessible via windows.system.object_manager
Note
See sample at Object manager
Warning
This API have not been tested on real cases yet and may be subject to changes.
2.13.1. ObjectManager¶
-
class
windows.winobject.object_manager.ObjectManager[source]¶ Represent the object manager.
Note
For now, it only offers the
rootKernelObject. But I want amanagerobject accessible fromwindows.systemjust like other API and not directly therootdirectory.-
__getitem__(name)[source]¶ Query
namefrom the root\directory:object_manager["RPC Control"]["lsasspirpc"] object_manager[r"\RPC Control\lsasspirpc"]
Return type: KernelObject
-
root¶ The root
\DirectoryType: KernelObject– The rootKernelObject
-
2.13.2. KernelObject¶
-
class
windows.winobject.object_manager.KernelObject(path, name, type=None)[source]¶ Represent an object in the Object Manager namespace
-
__getitem__(name)[source]¶ Query object
namefrom the directory, split and subquery on\:>>> obj <KernelObject "\Windows" (type="Directory")> >>> obj["WindowStations"]["WinSta0"] <KernelObject "\Windows\WindowStations" (type="Directory")> >>> obj["WindowStations\WinSta0"] <KernelObject "\Windows\WindowStations" (type="Directory")>
Return type: KernelObjectRaise: KeyErrorifnamecan not be found.
-
__iter__()[source]¶ Iter over the list of name in the Directory object.
Yield: str– The names of objects in the directory.Note
the
KernelObjectmust be of typeDirectoryor it will raiseNtStatusExceptionwith codeSTATUS_OBJECT_TYPE_MISMATCH
-
get(name)[source]¶ Retrieve the object
namein the current directory.Return type: KernelObject
-
items()[source]¶ Return the list of tuple (object’s name, object) in the current directory object.
Return type: [( str,KernelObject)] – A list of tupleNote
the
KernelObjectmust be of typeDirectoryor it will raiseNtStatusExceptionwith codeSTATUS_OBJECT_TYPE_MISMATCH
-
keys()[source]¶ Return the list of objects’ name in the current directory object.
Return type: [ str] – A list of nameNote
the
KernelObjectmust be of typeDirectoryor it will raiseNtStatusExceptionwith codeSTATUS_OBJECT_TYPE_MISMATCH
-
target¶ Resolve the target of a symbolic link object.
Return type: stror None if object is not a link
-
values()[source]¶ Return the list of objects in the current directory object.
Return type: [ KernelObject] – A list of objectNote
the
KernelObjectmust be of typeDirectoryor it will raiseNtStatusExceptionwith codeSTATUS_OBJECT_TYPE_MISMATCH
-