diff --git a/README.md b/README.md index 8204e16..a292bb2 100644 --- a/README.md +++ b/README.md @@ -104,6 +104,9 @@ VER_NT_WORKSTATION(0x1L) [, ] >>> windows.system.logicaldrives[0] +>>> windows.system.services[23] + + ``` ### IAT Hook @@ -247,6 +250,86 @@ KeyValue(name='MYQWORD', value=123456789987654321L, type=11) [KeyValue(name='MYQWORD', value=123456789987654321L, type=11), KeyValue(name='VALUE', value=u'a_value_for_my_key', type=1)] ``` +### Object manager + +PythonForWindows uses the native Windows NT API to display some information about the object in the Object Manager's name space. +Just like the well-known tools ``winobj.exe`` + +```python +>>> windows.system.object_manager.root + +# The objects of type "Directory" can be acceded just like a dict +>>> list(windows.system.object_manager.root)[:3] +[u'PendingRenameMutex', u'ObjectTypes', u'storqosfltport'] +# Find an object by its path +>>> windows.system.object_manager["KnownDLLs\\kernel32.dll"] + +>>> k32 = windows.system.object_manager["KnownDLLs\\kernel32.dll"] +>>> k32.name, k32.fullname, k32.type +('kernel32.dll', '\\KnownDLLs\\kernel32.dll', u'Section') +# Follow SymbolicLink object +>>> windows.system.object_manager["\\KnownDLLs\\KnownDLLPath"] + +>>> windows.system.object_manager["\\KnownDLLs\\KnownDLLPath"].target +u'C:\\WINDOWS\\System32' +``` + +### Scheduled Task + +The ``windows.system.task_scheduler`` object allows to query and create scheduled task. + +**This part is still in developpement and the API may evolve** + +```python +>>> windows.system.task_scheduler + +>>> windows.system.task_scheduler.root + +>>> task = windows.system.task_scheduler.root.tasks[2] +>>> task + +>>> task.name +u'DemoTask' +# Explore task actions +>>> task.definition.actions[1] + +>>> task.definition.actions[1].path +u'c:\\windows\\python\\python.exe' +>>> task.definition.actions[1].arguments +u'yolo.py --test' +``` + +### Event logs + +The ``windows.system.event_log`` object allows to query event logs. + +**This part is still in developpement and the API may evolve** + +```python +>>> windows.system.event_log + +# Find a channel by its name +>>> chan = windows.system.event_log["Microsoft-Windows-Windows Firewall With Advanced Security/Firewall"] +>>> chan + +# Open .evtx files +>>> windows.system.event_log["test.evtx"] + +# Query a channel for all events +>>> chan.query().all()[:2] +[, ] +# Query a channel for some ids +>>> chan.query(ids=2004).all()[:2] +[, ] +# Query a channel via XPATH +>>> evt = chan.query("Event/EventData[Data='Netflix']").all()[0] +# Explore event information +>>> evt + +>>> evt.data +{u'ModifyingUser': 69828304, u'RuleName': u'Netflix', u'ModifyingApplication': ...} +``` + ### ALPC-RPC #### ALPC @@ -401,7 +484,6 @@ The local debugger handles ### Other stuff (see doc / samples) - Network -- Services - COM diff --git a/TODO b/TODO index 42e71d1..32e034c 100644 --- a/TODO +++ b/TODO @@ -5,13 +5,14 @@ TODO: - Add news features to index.html - Document / fix / release: - windows.bits - - evtlog - - kernobj - window ====== - DBG + - FIX BP API !! + - add_bp(target=XXX) vs del_bp(targets=XXX) .... + - Verif multiple bp at same place.. - Verif multiple pending at same place - Test !! (bp, BP_HX, bp on only on process, bp_hx on only one thread..) @@ -61,6 +62,7 @@ TODO: Documentation * verif samples * windows.bits + - Document change in CurrentProcess read/write memory behavior ? RESSOURCE * read http://www.codeproject.com/Articles/18975/Listing-Used-Files \ No newline at end of file