Closed GoogleCodeExporter closed 8 years ago
Ok, thanks for the new hivelist, I'll try and take a look at in the next couple
of days.
It sounds, though, as if you're after two different things, one is more human
readable output (which is a matter of taste, but I'm happy to go with four
spaces and full key names). The second is machine readable output for scripts.
I'm not sure how best to deal with the difference between the two.
Particularly as a third option might be to output fully valid .reg files. I
don't know if they can contain timestamps (and to be honest, I'm not sure what
time the stamps represent). Moyix, any thoughts/suggestions on the situation?
We'll probably leave in the -o option in case the user ever wants to override
or for some other reason specify their own offset...
Original comment by mike.auty@gmail.com
on 8 Nov 2010 at 7:22
Yeah, no problem. From a malware perspective, there are two main reasons I'd
use the registry plugins:
1) Determine if a particular key exists anywhere in a hive
2) Determine which keys were modified within X number of minutes, hours, or
days since the time of some other suspicious activity
So to solve #1, if I know the full path to the key like
HKEY_LOCAL_MACHINE\Software\Microsoft\MaliciousKey, then I can just call
printkey directly and see if it exists. However, assuming I'm looking for
MaliciousKey, but it could be anywhere in the software hive, then I would want
to use hivedump like this:
$ python volatility.py hivedump -o OFFSET -f mem.dmp | grep MaliciousKey
HKEY_LOCAL_MACHINE\ThisKey\ThatKey\OtherKey\MaliciousKey
To solve #2, I would use the csv output like this:
$ python volatility.py hivedump -o OFFSET -f mem.dmp --output=csv
--output-file=keys.csv
Then open keys.csv in a spreadsheet and sort by timestamp. The timestamp value
indicates the last time a value was added to the key, a value was deleted from
the key, or when any value in the key was modified. So if I know the time when
a suspicious process started, or any other source, I can easily see if any
changes were made to the registry around the same time.
These are just my personal usage scenarios though, I don't know others plan to
use the plugins!
MHL
Original comment by michael.hale@gmail.com
on 8 Nov 2010 at 7:45
Yeah, ok. The trick is the output format stuff. I don't think there is
--output=csv (although scudette's working on something similar for all
plugins). Either way, it sounds as though a human is unlikely to read the raw
output from dumphive, and possibly the second method (which includes all the
known information about each key) is the best method, then other scripts/tools
can be used to reduce it to the necessary bits and pieces. I'm unlikely to
include the timestamp twice though, so I'll probably go with the a human
readable datetime (as we've done with other listing plugins), and then as long
as they in a standard output format, a script should be able to deal with them
appropriately. Hopefully that sounds a reasonable solution?
Original comment by mike.auty@gmail.com
on 8 Nov 2010 at 7:52
Yeah, to get --output=csv working I just added a HiveDump.render_csv function
and it was called properly. Sure, going with the human readable datetime is
fine. For some reason I thought some spreadsheets may have a problem sorting
the human readable datetimes, so I included the integer value also -- but it
looks like there's no problem.
Original comment by michael.hale@gmail.com
on 8 Nov 2010 at 9:07
Ok, so there now should be complete paths and last written times output in the
hivedump plugin. I haven't included any of the easy_name stuff, since I'm not
too keen to go hardcoding such path names into the plugin. I'd be happier
linking the file the hive was loaded from (and let the user decide which node
it'll have been loaded as), but I think that would be a bit cumbersome. I'm
not fixed on it, but I'd need some more convincing to think showing the
investigator a guessed name is a good idea...
Hope that's ok? If so, feel free to close the bug, if not we can leave it open
for discussion. 5:)
Original comment by mike.auty@gmail.com
on 8 Nov 2010 at 10:52
I'm happy with this, thanks for getting to it so quick, Mike!
Original comment by michael.hale@gmail.com
on 9 Nov 2010 at 2:53
My pleasure. 5:)
Original comment by mike.auty@gmail.com
on 9 Nov 2010 at 2:54
Original issue reported on code.google.com by
michael.hale@gmail.com
on 8 Nov 2010 at 6:21Attachments: