-
Notifications
You must be signed in to change notification settings - Fork 227
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
Hikvision, WFS and DHFS File System parser - DVR videos #1776
base: master
Are you sure you want to change the base?
Conversation
This needs to be disabled for now.
entroytest needs to be disabled for now.
This needs to be disabled for now.
Thanks @gfd2020 for this contribution. I'm changing this to draft until it is ready. |
3 years ago, I needed to research hikvision to try to recover images from a HD that had been formatted. There is no official documentation and the formatting is hikvision's own. I managed to find some software (paid) to recover the videos, but none of them have recovery of the Logs, which for an expert purpose is extremely important. paulo |
Hi Paulo. The implementation of this PR is based on the document below. The values of the logs are not being analyzed, but from what I've seen, it's ok to get the values of the log in the RATS fields. What you could help with is the interpretation of the RATS field descriptions. I looked at the HEX and I didn't understand the logic of the description. |
Hi @lfcnassif . Could you help me with the questions below so I can proceed with this PR?
|
Wouldn't it be more appropriate to implement this kind of FS as an DataSourceReader? |
Hi @gfd2020, sorry for my delay, currently I'm traveling on vacation...
|
This makes sense. But we would lost the ability to read this file system raw data from E01, Ex01, VMDK, VHD, VHDX and other image disk formats, and also to decode MBR and GPT partitions transparently, since TSK decoding would be skipped... As I said, the perfect approach would be to implement this into TSK, but I think it would need much more effort. |
Today, what does happen if a Vhd, an Ufdr or and Dd image is found inside
the original evidence passed to IPED? How their content are processed?
Em ter., 12 de set. de 2023 22:51, Luis Filipe Nassif <
***@***.***> escreveu:
… Wouldn't it be more appropriate to implement this kind of FS as an
DataSourceReader?
This makes sense. But we would lost the ability to read this file system
raw data from E01, Ex01, VMDK, VHD, VHDX and other image disk formats, and
also to decode MBR and GPT partitions transparently, since TSK decoding
would be skipped... As I said, the perfect approach would be to implement
this into TSK, but I think it would need much more effort.
—
Reply to this email directly, view it on GitHub
<#1776 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AG247S7RMIP3GSESTHE2JCTX2ENUJANCNFSM6AAAAAA2NM6MV4>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
They are passed to and decoded by SleuthkitReader through EmbeddedDiskProcessTask, except UFDR which is not processed recursively but as a common zip file. |
Couldn't these Hikvision partitions/disks be passed to be decoded by some HikvisionReader through the same EmbeddedDiskProcessTask? |
They could. But not sure if a HikVisionReader would be used directly in practice (like SleuthkitReader), since I think a DVR FS usually is into a partition (could you confirm @gfd2020?) that needs to be decoded first by TSK, so I think this would create another step for most cases. |
In the real cases I have, there is no disk initialization. The first sector of the disk is all zero (that is, without a partition system). The HikivisionFS starts in the second sector. Would this help with Patrick's suggestion? |
So, neither SleuthKit would show this as an item to be processed, and it seems that this "item" to be processed should first be carved from the unallocated space (as it would be identified by SleuthKit), right? |
Sleuthkit will complain that it does not recognize this item. So, Nassif gave me the tip to change a flag in the SleuthkitInputStreamFactory file to continue decoding the image bytes. From then on, as far as I remember, IPED fragmented everything and looked for carved files. IPED 4.1.4 log . Defaut config. Result: Decoding image C:\HVFS\test.E01
|
Yes, thanks!
I think so. Not sure, but I think @gfd2020 draft is reading data from the parent image. So it seems possible to create a HikVisionReader to decode DD images. For all others, like e(x)01, vmdk and vhd(x), they would need to pass through SleuthkitReader first. Honestly, I'm not sure which approach is better, creating a DatasourceReader or a Task, I think both would work, but the first would need an additional change in EmbeddedDiskProcessTask. |
I have some documentation of the format of this HD. |
Hi @paulobreim . I will make a change to the PR now for greater compatibility. Could you please try to improve log detection? |
After a little more work, I managed to get it working without changing any configuration parameters. In fact, you don't need to touch any of them. Basically I created a new constructor for the SleuthkitInputStreamFactory class to be able to use the decoded content of e01 (no external variable will be needed anymore). The main change that could impact the program in general is in the SleuthkitReader class. From what I tested, IPED worked normally on other types of images. However, we need to do regression tests. I'm finishing the changes and will commit. @lfcnassif , could you take a look when you get back from vacation? Thanks. |
Allows you to index videos recorded on a DVR with the Hikvision, WFS and DHFS file system.
This PR will need a lot of work. It turns off several flags to function and modifies the program's operation, causing malfunctions in the normal use of the IPED.