summaryrefslogtreecommitdiffstats
path: root/hivex/hivex.c
Commit message (Collapse)AuthorAgeFilesLines
* hivex: Fix handling of inline VKs.Richard Jones2010-02-051-20/+20
|
* hivex: Documentation and cleanups.Richard Jones2010-02-051-1/+2
|
* hivex: Make limits into macros.Richard Jones2010-02-051-4/+10
|
* hivex: Complete the implementation of adding child nodes.Richard Jones2010-02-051-6/+281
|
* hivex: allocate_block should update valid block bitmap.Richard Jones2010-02-041-0/+2
| | | | | | The internal allocate_block() function wasn't updating the bitmap, so if you revisited a block which you had allocated in the same session, you could get an EFAULT error.
* hivex: More debug messages.Richard Jones2010-02-041-1/+10
|
* hivex: Documentation update.Richard Jones2010-02-041-1/+1
| | | | | ntreg_lf_record can have id "lf" (old-style hashes) or "lh" (new- style hashes).
* hivex: Some missing le32toh endianness conversions.Richard Jones2010-02-041-2/+2
|
* hivex: Implement deleting child nodes.Richard Jones2010-02-041-0/+226
|
* hivex: Add flags argument to internal get_children() function.Richard Jones2010-02-041-14/+21
| | | | | | | | | When we later call get_children to visit the intermediate ri/lf/lh records, we have already deleted the subkey nk-records, so checking that those nk-records are still valid is not very helpful. This commit adds a flag to turn these checks off.
* hivex: Don't die on valid registries which have bad declared data lengths.Richard Jones2010-02-041-5/+8
| | | | | | | | | | | Some apparently valid registries contain value data length declarations which exceed the allocated block size for the value. Previously the code would return EFAULT for such registries. However since these appear to be otherwise valid registries, turn this into a warning and just use the allocated block size as the data length (in other words, truncate the value).
* hivex: Begin implementation of writing to hives.Richard Jones2010-02-041-0/+384
| | | | | | | | | This implements hivex_node_set_values which is used to delete the (key, value) pairs at a node and optionally replace them with a new set. This also implements hivex_commit which is used to commit changes to hives back to disk.
* hivex: Add HIVEX_OPEN_WRITE flag to allow hive to be opened for writing.Richard Jones2010-02-041-10/+34
| | | | | | | | | | | | | | | If this flag is omitted (as in the case for all existing callers) then the hive is still opened read-only. We add a 'writable' flag to the hive handle, and we change the way that the hive file (data) is stored. The data is still mmapped if the file is opened read-only, since that is more efficient and allows us to handle larger hives. However if we need to write to the file then we have to read it all into memory, since if we had to extend the file we need to realloc that data. Note the manpage section L</WRITING TO HIVE FILES> comes in a later commit.
* Document that this flag is clear for default keys.Richard Jones2010-02-041-1/+2
|
* Move htole*/le*toh macros into a separate header file.Richard Jones2010-02-041-41/+2
| | | | This allows us to reuse these macros in hivexsh later.
* hivex: Const-correctness fix on header_checksum (thanks Jim Meyering).Richard Jones2010-01-281-1/+1
|
* hivex: Update some previously unknown nk-record fields.Richard Jones2010-01-281-5/+11
| | | | | | Update these fields with what we found out from reverse engineering the file. Also bring the unknownX field names into line with visualizer.ml.
* hivex: Fix calculation of block size for vk data blocks.Richard Jones2010-01-281-1/+1
|
* hivex: Display incorrect block size as unsigned in an error message.Richard Jones2010-01-281-1/+1
|
* hivex: display bad block offset in hexRichard Jones2010-01-281-1/+1
|
* hivex: hive type in vk-record is an unsigned 32 bit intRichard Jones2010-01-281-1/+1
|
* hivex: Add missing le32toh conversion around field access.Richard Jones2010-01-281-3/+3
| | | | | This was missing. It only worked because we test on a little endian platform.
* hivex: Clarify some more fields.Richard Jones2010-01-281-2/+3
| | | | Taken from sentinelchicken.com documentation.
* hivex: Modify children/values functions to return intermediate blocks.Richard Jones2010-01-281-70/+168
| | | | | | | | | | | Modify the functions that return child subnodes and values so they can also be used to return a list of the intermediate blocks. This is so we can delete those intermediate blocks (in a later commit). We also introduce an offset_list structure which is used for collecting lists of offsets, ie. lists of nodes, values or blocks. Note that this commit should not change the semantics of the code.
* hivex: Add value_any callback to the visitor.Richard Jones2010-01-281-83/+95
| | | | | | | | | | The visitor currently contains lots of value_* callbacks, such as value_string which is called back when the value has type string. This is fine but it makes it complicated to deal with the case where you just want to see 'a value', and don't care about its type. The value_any callback allows visitors to see values generically.
* hivex: Move header checksum code into a function.Richard Jones2010-01-281-8/+16
| | | | This function can be reused later.
* hivex: page 'offset_next' field is really 'page_size'.Richard Jones2010-01-281-8/+8
| | | | | | | | The documentation, as usual, is contradictory. However this field is definitely the page size in all observed registries. Furthermore the following field marked 'unknown' is always zero, although this contradicts what the sentinelchicken.com paper says.
* hivex: Collect more statistics about registries.Richard Jones2010-01-281-20/+31
|
* hivex: Store filename in hive handle.Richard Jones2010-01-281-0/+7
|
* hivex: Various improvements in header parsing, thanks to better documentation.Richard Jones2010-01-151-22/+74
|
* hivex: Print header fields. Print all offsets in hex (in debug output).Richard Jones2010-01-151-16/+26
|
* hivex: Reenable checksum calculations, but don't check result.Richard Jones2010-01-151-3/+4
|
* hivex: Send all debug messages to stderr.Richard Jones2010-01-141-55/+55
|
* hivex: Remove stray debugging message.Richard Jones2010-01-141-1/+0
|
* hivex: Whitespace change.Richard Jones2010-01-141-1/+1
|
* hivex: Move STR* macros into C file.Richard Jones2010-01-141-0/+10
| | | | Don't pollute the public header file with these macros.
* use STREQ, not strcmp: part 1Jim Meyering2009-11-091-1/+1
| | | | | git grep -l 'strcmp *([^=]*== *0'|xargs \ perl -pi -e 's/\bstrcmp( *\(.*?\)) *== *0/STREQ$1/g'
* change strncmp() == 0 to STREQLEN()Jim Meyering2009-11-091-1/+1
| | | | | git grep -l 'strncmp *([^=]*== *0'|xargs \ perl -pi -e 's/\bstrncmp( *\(.*?\)) *== *0\b/STREQLEN$1/g'
* convert uses of strcasecmp to STRCASEEQJim Meyering2009-11-091-2/+2
| | | | | git grep -l 'strcasecmp *([^=]*== *0'| xargs \ perl -pi -e 's/\bstrcasecmp( *\(.*?\)) *== *0/STRCASEEQ$1/'
* placate 'make syntax-check'Jim Meyering2009-11-091-1/+0
| | | | * hivex/hivex.c: Remove unused "#include <assert.h>".
* hivex: fail upon integer overflowJim Meyering2009-11-041-0/+3
| | | | | * hivex/hivex.c (windows_utf16_to_utf8): Avoid overflow and a potential infloop.
* hivex: Check unchecked calloc (Jim Meyering).Richard Jones2009-11-041-0/+2
|
* Fix misspelling in previous commit.Richard Jones2009-10-291-2/+2
|
* RHEL 5: Also add le{16,64}toh functionsRichard Jones2009-10-291-0/+12
|
* RHEL 5: Detect endianness functions and supply them.Richard Jones2009-10-291-1/+30
|
* Support for Windows Registry.Richard Jones2009-10-291-0/+1398
In hivex/: This mini-library allows us to extract Windows Registry binary files ("hives"). There are also two tools: hivexml converts a hive to a self-describing XML format. hivexget can be used to extract single subkeys from a hive. New tool: virt-win-reg. This is a wrapper around the library functionality allowing you to pull out data from the registries of Windows guests.