New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Layerwriter: No output, debugger triggered. #412
Comments
So the parallelism flags have a tendency to be slightly slower, which is why they're disabled by default. You're right the pdb lines shouldn't have been there (and have been removed for the upcoming release, see commit f75e779), thanks for pointing that out. 5:) If lists is not populated, it should look for intel layers and try to dump them, if no intel layers are found, no layers will be dumped. We could change that to dumping all layers if you think it would be useful, but I suspect it's probably not what anyone ever wnats? You should run layerwriter with It's unfortunate that qemu files take so long to process, but unfortunately scanning such layers or doing lots of reads is very slow (hence the warning). It's not really feasible to determine which plugin is being run, so you'll get the advice to use layerwriter even when trying to use layerwriter. I've looked into telling the user which layer needs writing out in the slow warning, but unfortunately the warning occurs during the stacking phase (to avoid the warning showing up too often), and the stacking phase works by trying to create a layer and if it succeeds, only the configuration is passed back, and the layer is recreated (potentially with a different name). As such, it's not really possible to provide the information there, and ensuring the warning is only fired once on the reconstructed layer would be difficult (since it would fire during the stacking attempt, and thus confuse users). As such, I'm not entirely sure how to fix this. I'll have more of a think, but it may not be possible to reasonably solve this problem I'm afraid... 5:S |
Taking the user-interface / warnings stuff stuff aside, I do not (yet) know enough to argue with you on this one. 😄 I ran the
Since I don't really know what I am doing I decided to write all layers. 😄 That ended well for But this also took a lot of trial and error, is there something we can do to make this easier for the next person? I guess I could add my insights to the docs somewhere? I am just not sure of the "canonical" way to figure out what layer needs to be written. (Passed to It seems like here we are trying to choose a layer automatically, It just didn't work in my case? I also cant tell why. Shouldn't my |
I think I found the culprit! I removed aforementioned debugger lines and reran the layerwriter plugin without any arguments and set breakpoints like so:
And then I checked
AFAIK an empty list is falsy, but its not
So even though i did not specify a
BUT: The requirements for the LayerWriter specify the default value for "layers" as To be 100% sure I also checked |
Ah, good find. It appears as though ArgParser's list type arguments ignore the default (I assume only if it's not a list), so we need to fix up the layers code to check not just for None for but an empty list. I've merged the fix in and added it as a bugfix to the upcoming release. Thanks for figuring it out! 5:) |
I was trying to run volatility on a dump from a kvm, created with
virsh dump
. (Size: 551mb)Even with
--parallelism processes
it took somewhere around 20 minutes and it prompted me with the Layerwriter warning:"Reads to this layer are slow, it's recommended to use the layerwriter plugin once to produce a raw file"
I couldn't really find any very explicit documentation, but I figured layerwriter would "convert" my dump into something that can be processed faster by volatility, so I ran:
vol --parallelism processes -f memdump layerwriter.LayerWriter
Which after quite some time, dropped me to the python debugger. That left my quite baffled, but I peeked into the code,
discovered these two lines, removed them and reran. (I guess someone forgot to clean that up before committing?)
This time, tho, I was left with no output at all. It ate all of my CPU for 20 minutes and then stopped. :/ As far as I can tell no file was written.
(Here I would like to note that prompting the user to run the layerwriter plugin while he is running that very plugin seems almost like mockery. 😄 )
I guess
self.config['layers']
ends up being empty, which would mean that there where nomapped
layers? I do not know what exactly that means and whether it is a "non-bug" edge case. If it is, it would make sense to at least let the user know that we can not write any file for him. Maybe we could also detect this case earlier and safe him a bunch of runtime?(Edit for searches:)
Analyzing QEMU or KVM virsh dumps in volatility.
The text was updated successfully, but these errors were encountered: