It is currently Sun Jan 17, 2021 11:21 am
All times are UTC + 8 hours

retrieving encryption key from an unmounted drive

retrieving encryption key from an unmounted drive

Postby spikey1973 » Fri May 15, 2020 7:29 pm

Hey to all of you here,

i got myself into some trouble.
I have a drive in my 6102T nas that is failing smart, so under ADM it doesn't mount althought it still works perfectly.
so before it fails or before i send it in for warrenty i would like to recover the data.

but at one silly point i decided it was a good idea to encrypt the drive. probably downloaded the key too.. but.. probably deleted that at one point or it is still on a laptop behind the closed borders.. anyway. for now i don't have the key.
i probably do know the password. but the password aint the key ofcourse. and the password is only usefull when mounted in the nas.. so yeah indeed big bummer.

so i was wondering if it is at all possible to retrieve the key of an unmounted drive through ADM. (or external access)

wat i also was wondering.. if i would get a clone made of the drive... (seagate data recovery) would that same password / key / automount option still work

(i already asked around about the possibility to mount the drive.. seems not possible in the nas)
spikey1973
 
Posts: 53
Joined: Fri Feb 10, 2017 4:11 am

Re: retrieving encryption key from an unmounted drive

Postby ilike2burnthing » Sat May 16, 2020 12:33 am

If you haven't already, I'd recommend opening a support ticket, just in case no one here is able to answer your question.

https://support.asustor.com/index.php?/Tickets/Submit
ilike2burnthing
 
Posts: 138
Joined: Thu Apr 09, 2020 8:01 pm

Re: retrieving encryption key from an unmounted drive

Postby spikey1973 » Sat May 16, 2020 4:19 am

ilike2burnthing wrote:If you haven't already, I'd recommend opening a support ticket, just in case no one here is able to answer your question.


thanks, that is indeed a good tip, did just that!
spikey1973
 
Posts: 53
Joined: Fri Feb 10, 2017 4:11 am

Re: retrieving encryption key from an unmounted drive

Postby zurk » Sun May 17, 2020 12:05 am

you will find support to be worse than useless.
copy the drive data asap to a new drive. the encryption is pretty standard so mount it on a linux machine and try cryptfs decryption. asustors are basically bog standard linux machines.
heres my script which you can get bits off to use them yourself :

#modprobe rr62x
#mdadm --assemble --scan
iscsiadm -m discovery -t st -p nas
iscsiadm -m node -T "iqn.2011-08.com.asustor:as-608t-xxx.raid6" -p 192.168.x.x:3260 --op=update --name node.session.auth.authmethod --value=CHAP
iscsiadm -m node -T "iqn.2011-08.com.asustor:as-608t-xxx.raid6" -p 192.168.x.x:3260 --op=update --name node.session.auth.username --value=nasraid6
iscsiadm -m node -T "iqn.2011-08.com.asustor:as-608t-xxx.raid6" -p 192.168.x.x:3260 --op=update --name node.session.auth.password --value=nasraid6
iscsiadm -m node -T "iqn.2011-08.com.asustor:as-608t-xxx.raid6" -p 192.168.x.x:3260 --login

#/usr/sbin/blkid
#lsblk
#mdadm --assemble /dev/md1 /dev/sdd /dev/sde /dev/sdf /dev/sdg
#g15stats -d
modprobe dm-crypt
apt-get update
#mdadm --detail -v /dev/md0
#mdadm --detail -v /dev/md1
apt-get dist-upgrade
apt-get upgrade
apt-get clean
#/usr/sbin/cryptsetup -v luksOpen /dev/md0 md0
/usr/sbin/cryptsetup luksOpen /dev/disk/by-uuid/xxxx nasraid6
#/usr/sbin/cryptsetup resize nasraid6
#/usr/sbin/cryptsetup status nasraid6
#e2fsck -f /dev/mapper/nasraid6
#resize2fs /dev/mapper/nasraid6
#/usr/sbin/cryptsetup luksOpen /dev/md1 md1
#e2fsck -y /dev/mapper/md0
/usr/sbin/e2fsck -y /dev/mapper/nasraid6
#e2fsck -y /dev/mapper/md1
#mount -t ext4 /dev/mapper/md0 /junk
mount -t ext4 /dev/mapper/nasraid6 /san/RAID6
#mount -t ext3 -o rw /dev/sdd1 /san/usb
#mount -t ext2 -o ro /dev/sdd1 /san/usb
/etc/init.d/logitechmediaserver stop
/etc/init.d/apache2 stop
/etc/init.d/mysql start
/etc/init.d/apache2 start
/etc/init.d/logitechmediaserver start
#/etc/init.d/mediatomb restart
#apt-get install iscsitarget-dkms iscsitarget isns-client isns tgt iscsitarget-source iscsi-initiator-utils open-iscsi
#pico -w /etc/default/iscsitarget
#pico -w /etc/iscsi/iscsid.conf
#/etc/init.d/open-iscsi restart
#iscsiadm -m discovery -t st -p nas
#iscsiadm -m node --login
#fdisk -l
#/usr/sbin/cryptsetup -v luksFormat /dev/sdh
#/usr/sbin/cryptsetup luksOpen /dev/sdh nasraid6
#/usr/sbin/cryptsetup -v status nasraid6
#mkfs.ext4 /dev/mapper/nasraid6
#mount -t ext4 /dev/mapper/nasraid6 /san/test
#swapon /san/swapfile
zurk
 
Posts: 41
Joined: Sat Feb 28, 2015 11:27 am

Return to ADM general

  • You cannot post new topics in this forum
    You cannot reply to topics in this forum
    You cannot edit your posts in this forum
    You cannot delete your posts in this forum
    You cannot post attachments in this forum
  • Who is online

    Users browsing this forum: No registered users and 1 guest