💻 /var/www/html/index.php
_ □ ✕
📄 vim /home/jake/posts/the-bonesaw.md
_ □ ✕
« cd .. (Back to Feed)

THE BONESAW

Sometime last week, we had a client who needed a total overhaul of their camera system. They had a failure in their old-school, analogue DVR system. The whole setup was jank and probably needed the upgrade long before the old system died. We did the project. Replaced the DVR for an new Synology, PoE cameras, the whole shebang. But, by the end, they requested that we harvest the old drives and rip the most recent footage. For compliance reasons, they needed these videos to pass along with their report.

The NVR was a Hikvision system. I didn’t know anything about it at the time, but assumed it was using a standard file system. I thought I could just mount the old drives onto my computer, and copy. Big-time wrong. Turns out Hikvision uses their own proprietary file system, file format, and the like. Which means a lot more work than I had initially anticipated. There’s tools extracting data, but running tools means potential data loss, and there wasn’t a lot of room for that.

I had three drives. Two 2TB drives and an 8TB. I had no idea the possible RAID config these things were on, and the odd number of drives didn’t give me much of an idea. Also, my office PC is one of those tiny form-factors without a single SATA slot. I needed to somehow mount a drive on the system, clone the drive, and run the tools to extract the full file system.

Hence, the Bonesaw.

The most I could dig up around the office was an old Dell Inspiron tower gathering dust somewhere behind a shelf. I tore it apart and installed Arch Linux on that SSD you see hung there so lovingly. After that, I created a clone of a 4TB drive we recovered on site onto another we had laying around using ddrecord

With the drive cloned, I found this Github repo called Hikvision-Data-Recovery, and it saved my ass big time. I was able to dump everything available on that disk into .mp4 format and pass it back to the client.

Personally, in my humble Tier 1 opinion, I think doing anything to slow the process of recovering data on DVR drives intended to be used in an enterprise environment is fucking dumb.

All in all, neat project. My time dicking around in the homelab, and piecing together a functional PC from obsolete e-waste really paid off for this one.

"the-bonesaw.md" [readonly] utf-8 100%