Skip to content
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

Brunnhilde was unable to export files from disk image #20

Closed
bdietz opened this issue Apr 14, 2017 · 19 comments
Closed

Brunnhilde was unable to export files from disk image #20

bdietz opened this issue Apr 14, 2017 · 19 comments

Comments

@bdietz
Copy link

bdietz commented Apr 14, 2017

I've been creating raw images of a USB flash drive with dd and dd forked and patched tools (ddrescue, dc3dd, dcfldd). I'm on a Mac, and the drive is Windows NTSF format. I've been testing .dd as output. When I run Brunnhilde over the image file with the -d option it's not able to export files and closes down. If I change the extension to .img and mount the files to my computer using Disk Utility, they mount, and I can run Brunnhilde over the volume just fine. I've also tested this with writing the image to .img. I am able to run Brunnhilde over .iso images of optical discs. I'm wondering if there's something peculiar about how dd-based tools create images. IIRC, I've successfully used Brunnhilde over raw files created using FTK Imager (.001). Thanks.

@bdietz
Copy link
Author

bdietz commented Apr 14, 2017

.img file was mounted using DiskImageMounter, not Disk Utility.

@tw4l
Copy link
Owner

tw4l commented Apr 14, 2017

Hi Brian,

That's interesting. I have definitely been able to use Brunnhilde with (at least some) dd images in the past, but you may be right that there's an issue with at least some.

Brunnhilde relies on tsk_recover to export files from disk images. Can you test tsk_recover on its own against the dd image and report back?

Maybe a factor, since you mentioned ddreacue - is the image missing a sizable number of sectors?

@bdietz
Copy link
Author

bdietz commented Apr 14, 2017

Thanks, Tim. tsk_recover can't determine the file system type. If I pass -f ntfs, it reports "unsupported file system type: ntfs". But I think I'm getting conflicting info in diskutil and Disk Utility about filesystem. I think I need to dig into this a bit more. Possibly something to do with partitions?

ddrescue reports that it rescued all the bits.

Next week, I'll dig in a bit more into tsk_recover options, play around with reimaging the disk, and also try imaging a different drive. Thanks for the quick response. It's reassuring to know that it ought to work.

Brian

@tw4l
Copy link
Owner

tw4l commented Apr 15, 2017

Hmm, interesting. I found this potentially relevant open issue. When you take a look at it next week, maybe try running mmls against the image and then passing the sector offset for the ntfs partition to tsk_recover as the post describes?

@bdietz
Copy link
Author

bdietz commented Apr 17, 2017

Well...using the offset in tsk_recover worked...sorta. It looks like I recovered deleted files, and not the ones I see when I mount the .img file or even when I insert the usb stick.

I did figure out why I was getting what I thought was conflicting information about the filesystem. It's exfat. From https://wiki.sleuthkit.org/index.php?title=ExFAT_Implementation_Notes:

ExFAT shares the same partition code as NTFS, so the string displayed by mmls for type 0x07 is now "NTFS / exFAT (0x07)".

@bdietz
Copy link
Author

bdietz commented Apr 17, 2017

Tim, disregard most that last comment. I just imaged another usb stick, and I'm having the same issues, including recovering the same unexpected files from the .img file. I'm not quite sure what's going on, but this has gone beyond an issue with Brunnhilde. Thanks for your responses. -Brian

@tw4l
Copy link
Owner

tw4l commented May 12, 2017

Hi Brian. I'm closing this for now, as the problem seems larger than Brunnhilde. But if you figure it out and think it's something that could be improved within Brunnhilde, please let me know.

@tw4l tw4l closed this as completed May 12, 2017
@bdietz
Copy link
Author

bdietz commented May 22, 2017

Hi Tim. Thanks, again for your responses. One last question (maybe), eve though this is closed. Can one use the offset option for tsk_recover in Brunnhilde? Or, would it be a possible feature. The use case is wanting to parse a partition of an image that tsk_recover is not able to parse otherwise.

@tw4l
Copy link
Owner

tw4l commented May 22, 2017

Hi Brian. That functionality isn't currently supported, but it sounds like a good addition to me. I'm on vacation starting tomorrow but will reopen this and plan to add the functionality when I return.

From your perspective, are there other tsk_recover flags/options besides offset that I should add to Brunnhilde?

@tw4l tw4l reopened this May 22, 2017
@bdietz
Copy link
Author

bdietz commented May 23, 2017

Super! Thanks. I think there's probably a use case for recovering allocated (-a) vs all files (-e). Enjoy your vacation.

@tw4l
Copy link
Owner

tw4l commented Jun 6, 2017

Hi Brian,

I added some additional tsk_recover functionality in branch dev-1.5.0. Want to try it out and let me know how it works for you? I've tested it on a few sample disks here but it would be great to confirm that it's behaving as expected with a wider sample.

There are a few other changes I'm planning to wrap into v1.5.0, so no great rush on this.

Thanks!

@tw4l
Copy link
Owner

tw4l commented Jun 6, 2017

(The README is updated as well and should be self-explanatory, but let me know if not and I can improve that as well)

@tw4l
Copy link
Owner

tw4l commented Jun 12, 2017

Hi Brian -- After some more testing on my own, I merged 1.5.0 into the Master branch and updated the version in PyPI. So go ahead and test on the main release :)

@bdietz
Copy link
Author

bdietz commented Jun 19, 2017

Hi Tim, I really am trying to get to this to test. I tried it last week, without much luck, but when I tried tsk_recover on its own, I got some weird results. So, I'm trying to get back to this with a fresh image. I'm sorry for the delay.

@tw4l
Copy link
Owner

tw4l commented Jun 19, 2017 via email

@bdietz
Copy link
Author

bdietz commented Aug 8, 2017 via email

@tw4l
Copy link
Owner

tw4l commented Aug 10, 2017

Hi Brian. I think what was happening was a really simple off-by-one indexing error in how the tsk options were being added into the tsk_recover command. I've attempted a fix in this branch but don't have any suitable disk images to test.

Want to try downloading the code from that branch and trying with that local version of brunnhilde before I push it to a new bugfix release? Thanks!

@bdietz
Copy link
Author

bdietz commented Aug 10, 2017 via email

@tw4l
Copy link
Owner

tw4l commented Aug 10, 2017

Great! I wrapped this with another quick bug fix in release 1.5.3 and pushed it to PyPi so you should now be able to update with sudo pip uninstall brunnhilde && sudo pip install brunnhilde. Thanks for reporting the bug and I'm glad it's working now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants