Commit Graph
5039 Commits
Author SHA1 Message Date
David McDonald c8e67e526a Convert ValueError to TypeError
All other methods in this class raise a `TypeError` if the hive was not
instantiated on a registry layer; this changes makes this method
consistent with the convention used in the others.

All `except` blocks checking for `ValueError` have been audited to
ensure that this doesn't break exception handling in existing code
within the framework. This also includes a minor version bump because:

1. RegistryHives are currently only instantiated one way, which is
   through the `hivelist` plugin. `hivelist` uses the correct layers when
   instantiating the hives.
2. Because there is currently a single source for registry hives, and
   it's unlikely that a hive from that source will ever be created on
   the wrong layer, it's unlikely that the existing `ValueError` is
   being raised anywhere within the framework's code.
3. It seems unlikely that consumers of this framework would be
   instantiating registry hives independent of the `hivelist` plugin,
   given that they would effectively have to duplicate the `hivelist`
   code to do so.

For these reasons, we're going to do a minor version bump, even though
an argument can be made that this warrants a major version bump
according to the SemVer rules. This is a one-off and does not indicate
any change in the way that we typically update version numbers.
2025-01-01 22:43:01 -06:00
ikelosandGitHub f9d967aba6 Merge branch 'develop' into issue_1469_cachedump_exception 2025-01-01 13:05:33 +00:00
ikelosandGitHub 9a4ec65e19 Merge pull request #1501 from volatilityfoundation/issue_1484_printkey_traceback
Windows Registry: Catch RegistryInvalidIndex
2025-01-01 12:59:49 +00:00
David McDonald fa67f10d31 Windows Registry: Catch RegistryInvalidIndex
refs #1484

This catches uncaught exceptions when casting the cell to a string in
`get_node`.
2024-12-31 11:54:16 -06:00
David McDonald f87d2459e0 Windows Registry: Update docstrings + exceptions
This updates the docstrings on several methods to indicate that they may
raise an exception.
2024-12-31 11:18:25 -06:00
David McDonald 263c87611b Windows Registry: Handle exceptions in read calls
These calls to `.read()` can raise an `InvalidAddressException`. Instead
of propagating this exception to the caller, this adds debug logging,
and pads the data will null bytes.

Also updates the docstring for `decode_data()` to indicate that it can
raise `TypeError` and `ValueError`.
2024-12-31 10:43:27 -06:00
ikelosandGitHub 6d0d9c4ec0 Merge pull request #1499 from volatilityfoundation/issue_1493_handles_bugs
Windows Handles: Fix remaining tracebacks
2024-12-31 12:42:02 +00:00
ikelosandGitHub d9807579cf Merge pull request #1498 from j-t-1/sort
Sort imports and swap two assignments
2024-12-31 12:35:35 +00:00
David McDonald 9a5365e681 Windows Handles: Fix unbound local in exception handler
This fixes an unbound local used in a debug message; If the exception is
raised during the dereference operation, the `objct` variable may be
uninitialized. This uses the offset of `ptr` instead.
2024-12-30 16:59:40 -06:00
David McDonald 3288ac9713 Windows Handles: Handle possibly invalid memory accesses
Any number of member accesses here can raise an
`InvalidAddressException`; each is now checked, and `None` returned if
any `InvalidAddressException` occurs.
2024-12-30 16:31:22 -06:00
j-t-1andGitHub 21077f909f Sort imports and swap two assignments 2024-12-30 22:28:47 +00:00
David McDonald f3294ef5f1 Windows Registry: Handle possible exception in get_node
Encountered a `SwappedInvalidAddressException` within the call to `cast`
due to an underlying call to `read`.
2024-12-30 14:29:20 -06:00
David McDonald 3eeb10be29 Windows Registry: Handle uncaught exceptions
A number of calls to `get_key` across multiple plugins are not made
within a `try/except` block that handles
`registry.RegistryFormatException` - the calls are either unprotected or
only check for `KeyError`. This adds the required `try/except` blocks,
or updates the existing ones as needed.
2024-12-30 14:29:20 -06:00
David McDonald 5af5363c46 Windows Handles: Work in fixes from @attrc
These changes fix bugs encountered during regression testing related to
virtual offset validation and string length checks.
2024-12-30 13:52:43 -06:00
ikelosandGitHub 9a6ab5831d Merge pull request #1497 from volatilityfoundation/issue_1477_skeleton_key
Fix uncheck read() call and remove variable that would not be definie…
2024-12-30 18:57:18 +00:00
Andrew Case a3844e8bc5 Fix uncheck read() call and remove variable that would not be definied if exception triggers 2024-12-30 18:08:30 +00:00
Andrew Case 2153b742a1 Fix uncheck read() call and remove variable that would not be definied if exception triggers 2024-12-30 18:06:04 +00:00
David McDonald e9d9345cef Windows Cachedump: Handle uncaught InvalidAddressException 2024-12-30 09:37:40 -06:00
ikelosandGitHub 3211fc1e6c Merge pull request #1495 from j-t-1/rsplit
Use rsplit instead of split
2024-12-30 12:24:40 +00:00
j-t-1andGitHub 28ff910d62 Use rsplit instead of split
Since we want to split rightmost only.
2024-12-30 10:58:38 +00:00
ikelosandGitHub eccaa5758c Merge pull request #1494 from j-t-1/enumerate
Use enumerate for readability
2024-12-30 00:27:27 +00:00
ikelosandGitHub cea6f109d7 Merge pull request #1464 from volatilityfoundation/windows_suspended_threads
Add the suspended threads plugin from DEF CON 2024
2024-12-30 00:26:21 +00:00
ikelosandGitHub cbd03d2c94 Merge pull request #1492 from volatilityfoundation/netstat_bug_fixes
Significantly improve the smear/error handling in the netstat plugin
2024-12-30 00:22:25 +00:00
ikelosandGitHub dddfffa17a Merge pull request #1491 from volatilityfoundation/issue_1470_vads
Do not analyze processes without VADs #1470
2024-12-30 00:12:04 +00:00
ikelosandGitHub d7338cfe11 Merge pull request #1486 from j-t-1/space
Remove superfluous spaces in intermed.py
2024-12-30 00:07:01 +00:00
ikelosandGitHub 3507384e8c Merge pull request #1489 from volatilityfoundation/issue_1483_driver_smear
Prevent infinite loops in device enumeration extensions #1483
2024-12-30 00:06:10 +00:00
ikelosandGitHub 74b4d18d5f Merge pull request #1485 from j-t-1/extensions
Make ETHREAD year check dynamic
2024-12-30 00:02:47 +00:00
j-t-1andGitHub 52a643d5b7 Use enumerate for readability 2024-12-29 20:29:03 +00:00
Andrew Case 65f602965b Address feedback 2024-12-29 02:47:48 +00:00
Andrew Case 61d6a92f8f Significantly improve the smear/error handling in the netstat plugin 2024-12-29 02:25:17 +00:00
Andrew Case 33855cf920 Significantly improve the smear/error handling in the netstat plugin 2024-12-29 02:20:02 +00:00
Andrew Case e64af61efa Do not analyze processes without VADs #1470 2024-12-29 02:13:18 +00:00
Andrew Case bf7f1ca91e Prevent infinite loops in device enumeration extensions #1483 2024-12-28 22:43:56 +00:00
Andrew Case 1bd031b9a8 Prevent infinite loops in device enumeration extensions #1483 2024-12-28 22:42:25 +00:00
j-t-1andGitHub 37873f9e15 Remove superfluous spaces in intermed.py 2024-12-28 16:58:24 +00:00
j-t-1andGitHub 834b7d0f07 Make ETHREAD year check dynamic
Change upper bound year check of ETHREAD to be a decade from now. Makes consistent with EPROCESS.
2024-12-28 14:58:12 +00:00
ikelosandGitHub b1a42d9510 Merge pull request #1467 from j-t-1/BasicTypes
Use BasicTypes variable
2024-12-26 22:11:45 +00:00
j-t-1andGitHub 4c430d2ec4 Use BasicTypes variable
This removes a "float", which should be excluded.
2024-12-26 07:27:45 +00:00
ikelosandGitHub a07c5d3063 Merge pull request #1354 from Abyss-W4tcher/fbdev_plugin
New Linux plugin: fbdev graphics API
2024-12-25 19:21:38 +00:00
ikelosandGitHub 93b09fd974 Merge pull request #1466 from j-t-1/configuration
Tweak configuration.py
2024-12-25 19:17:26 +00:00
j-t-1andGitHub 79fe1c50df Tweak configuration.py
Create a tuple directly and replace random.choice by random.choices.
2024-12-24 19:42:05 +00:00
Abyss Watcher ea2757c06c minor version bump 2024-12-24 11:45:23 +01:00
Abyss Watcher 0bb09191aa file output failure results in UnreadableValue 2024-12-23 21:28:58 +01:00
ikelosandGitHub 1f91fd4d69 Merge pull request #1460 from volatilityfoundation/issues/issue1436
Generic: Fix up potential issue with isfinfo
2024-12-23 17:05:47 +00:00
ikelosandGitHub b630cfaeec Merge pull request #1462 from volatilityfoundation/issues/issue1442
Layers: Fix vmware layer without a suitable meta
2024-12-23 17:05:11 +00:00
ikelosandGitHub 9b27f5eeca Merge pull request #1461 from volatilityfoundation/issues/issue1441
Layers: Fix MSF page len on a possibly uninitialized variable
2024-12-23 17:03:28 +00:00
ikelosandGitHub 8e851c44f9 Merge pull request #1454 from j-t-1/simple
Reformat how to write a simple plugin
2024-12-23 16:43:55 +00:00
j-t-1andGitHub df37f0a909 Reformat how to write a simple plugin 2024-12-23 15:34:17 +00:00
j-t-1andGitHub 9d4dd010a7 Reformat how to write a simple plugin 2024-12-23 15:28:40 +00:00
Abyss Watcher 8d213284e6 handle NotAvailableValue in filename 2024-12-22 14:23:04 +01:00