38

The answer to this question used to be FreeOTFE (https://en.wikipedia.org/wiki/FreeOTFE); sadly, the project has not been updated for three years and its website (http://www.freeotfe.org) is no longer online.

Is there any software available now that can be used to access LUKS/dm-crypt volumes from Windows, now that FreeOTFE is no longer maintained/available?

6 Answers6

18

LibreCrypt (formerly DoxBox, itself formerly FreeOTFE) offers LUKS-compatible disk encryption for Windows. It will also open legacy FreeOTFE volumes.

nitrl
  • 419
10

WSL 2 on Windows10

Windows allows now to mount physical disks using the Windows Subsystem for Linux 2 (WSL).

For people who are not familiar with WSL2:

... Windows Subsystem for Linux is a compatibility layer for running Linux binary executables natively on Windows 10 and Windows Server 2019. In May 2019, WSL 2 was announced, introducing important changes such as a real Linux kernel, through a subset of Hyper-V features. ...

find more on Wikipedia

The Windows 10 WSL2 now supports a mount command for linux filesystems called wsl.

First of all you have to install WSL2 on your windows10+ release. I recommend to simply follow the microsoft installation guide.

Now you can use apt commands as common on ubuntu/debian systems

sudo apt install cryptsetup

and use thecryptsetup luksOpen command.

Previous WSL didn't support CRYPT, and you had to recompile the kernel. To check if DM_CRYPT is supported on your system, open a wsl2 terminal and type the following command:

cat /proc/config.gz | gunzip | grep CONFIG_DM_CRYPT

The output should be CONFIG_DM_CRYPT=y without a hash (# ), and =y should be set.

abu_bua
  • 558
  • 9
  • 9
7

2023 Answer

You can use Linsk. It is a utility that wraps around a lightweight Alpine Linux VM, allowing you to mount any Linux file system (including LUKS) that is then exposed to the host machine through a network file share.

Disclosure: I'm the author.

Alex S.
  • 282
1

As other commentors have mentioned, one approach is to use a VM running linux and copy the files out. For the sake of this process being easier to run for others, and for me when I want to do this again. These are the steps I followed:

  • Install VirtualBox
  • If you are mounting from USB you probably need to add the USB3 extension pack from here https://www.virtualbox.org/wiki/Downloads
  • Download debian linux from osboxes https://www.osboxes.org/debian/ and add a virtualbox image from this
  • Add a usb device from the preferences for this device
  • Install cryptsetup apt-get install cryptsetup
  • Run cryptsetup open /dev/$BLAH encrypted
  • You should then be able to mount /dev/mapper/encrypted and read files.
Att Righ
  • 910
  • 1
  • 9
  • 18
1

For Windows 10 (and 11) I finally managed to mount a LUKS encrypted HDD using WSL in a PowerShell with administrative rights like this:

  1. install WSL in windows using the official instructions, and in my case I used the default distribution (Ubuntu);
  2. Upon reboot, open a powershell with administrative rights, to enter:
    wsl sudo apt update
    wsl sudo apt upgrade
    wsl sudo apt-get install cryptsetup
  1. At this point, connect your encrypted HDD to the pc via USB port and, always in the PowerShell with administrative rights, run the following command to identify the DeviceID of the encrypted HDD, obtaining the DeviceID (in my case \\.\PHYSICALDRIVE1):
    GET-CimInstance -query "SELECT * from Win32_DiskDrive"
  1. At this point, mount the device thus identified:
    wsl --mount \\.\PHYSICALDRIVE1 --bare
  1. Identify the letter (sdX, in my case sdc) associated with the block of the device crypto_LUKS by giving:
    wsl lsblk -f
  1. At this point use cryptsetup:
    wsl sudo cryptsetup luksOpen /dev/sdX my_cryptdisk
  1. Then verify to find /dev/mapper/my_cryptdisk, and create the mount point folder:
    wsl sudo mkdir /mnt/cryptdisk
  1. Finally perform the mounting:
    wsl sudo mount /dev/mapper/my_cryptdisk /mnt/cryptdisk
  1. The contents of the decrypted and mounted disk can be found in the path \\wsl$\<yourDistroName>\mnt\cryptdisk

#References:

  1. https://libraibex.com/posts/windows-wsl-luks/
  2. https://devblogs.microsoft.com/commandline/servicing-the-windows-subsystem-for-linux-wsl-2-linux-kernel/
0

FreeOTFE from 2010, although abandonware, is still available for download from here.

However, while as far as I know it is the only solution of its kind, there were still reports of problems and bugs with this product. Therefore @Kibbee's comment of using in Windows a Linux virtual machine might be the safest way to go.

I don't know of any successors to FreeOTFE.

I remark that Truecrypt is an excellent alternative to LUKS/dm-crypt, available on both Linux and Windows and still under development.

harrymc
  • 498,455