Hello everybody.
Today i have a tutorial and a curiosity at the same time. Suppose you install a new physical disk to a computer where you must store some sensitive data. You can do this with the following commands:
Find out what is the name of new disk (usualy it is /dev/sdX where X is a,b,c,d)
- Setup and format LUKS
- Open container
- Fill data with 0 before putting any data there
- Format it with ext4
- Mount it somewhere
- Copy data on it from secure web transfer
Let's the server gets a shutdown/reboot (power outage) without manually running the `cryptsetup luksClose safe_data`. Can you access the data without the password. Remember you did not closed the container.
You can have physical access to the disk, dump ram memory or even using recovery software.
What about run-time attacks (like having access to the server but not knowing user/pass to log in)?
What ideas do you have on this?
Today i have a tutorial and a curiosity at the same time. Suppose you install a new physical disk to a computer where you must store some sensitive data. You can do this with the following commands:
Find out what is the name of new disk (usualy it is /dev/sdX where X is a,b,c,d)
Code:
lsblk
- Setup and format LUKS
Code:
cryptsetup luksFormat --type luks2 /dev/sdb
- Open container
Code:
cryptsetup luksOpen /dev/sdb safe_data
- Fill data with 0 before putting any data there
Code:
dd if=/dev/zero of=/dev/mapper/safe_data status=progress
- Format it with ext4
Code:
mkfs.ext4 /dev/mapper/safe_data
- Mount it somewhere
Code:
mount /dev/mapper/safe_data /home/safe_data
- Copy data on it from secure web transfer
Code:
cd /home/safe_data
Let's the server gets a shutdown/reboot (power outage) without manually running the `cryptsetup luksClose safe_data`. Can you access the data without the password. Remember you did not closed the container.
You can have physical access to the disk, dump ram memory or even using recovery software.
What about run-time attacks (like having access to the server but not knowing user/pass to log in)?
What ideas do you have on this?