By using Dislocker we can decrypt a Bitlocker encrypted partition on Linux and macOS. In this post we’ll be doing this on macOS.
1. Installing Dislocker and FUSE for macOS
Start by downloading Dislocker and extract the package. Then we can install Dislocker and FUSE for mac OS (which is a needed for dislocker) using Homebrew.
Enter the following commands in a terminal:
When I ran the last command to install dislocker this error showed up:
By unlinking ruby as explained by jricks92 on Github the install went through with no errors:
2. Drive identifier
Now we need to know the identifier of the bitlocker encrypted disk. In the terminal we’ll run the command diskutil list
(on macOS).
The identifier i’m interested in here is called disk2s1
3. Encrypt with dislocker
First we need to create a folder where a virtual NTFS partition called dislocker-file will be created. I’ll call mine externalhdd and i’ll create it in the mnt folder.
Now it’s time to use Dislocker to decrypt the disk.
-V /dev/disk2s1
tells dislocker what disk to decrypt.
-u
tells dislockers to ask the user for the password the disk is encrypted with. -- /mnt/externalhdd
passes the path to the folder we created to store the virtual ntfs-partition.
4. Create a block device
Now we need to create a block device before mounting the disk.
hdiutil
- manipulate disk images (attach, verify, create, etc)
attach
- Attach a disk image as a device
imagekey
- specify a key/value pair for the disk image recognition system. I can’t find information on what the diskimageclass=creatdiskimage means in the man pages of hdiutil.
nomount
- indicate whether filesystems in the image should be mounted or not.
After running this command i got the line /dev/disk3 printed in the console. Now we’ll use that to mount the drive.
5. Mount
Start by creating a folder where the drive will be mounted
Then we run this command to mount it (only readable):
And by now, if you haven’t encountered any errors, you should see the disk in Finder.
Documentation
There are more to dislocker than this post shows, take a look at the man pages to get more info: