24 August 2019

Disclaimer

Disclaimer

Disclaimer

The author will not take any liability for any damage(s) caused by use, misuse, improper use etc. of the tutorial(s) by the author. If any damage(s) has occured, the author can't be held responsible for it. The reader are responsible on their own when following (and using) the tutorial(s).

All tutorials are for educational purposes.


Author: Jor Teron <jor dot teron at gmail dot com> Goto bottom

Input:

21 July 2015

Data Security: Cryptsetup

Data Security: Cryptsetup

Data Security: Cryptsetup

Cryptsetup

according to the MAN page:
cryptsetup - manage plain dm-crypt and LUKS encrypted volumes

..cryptsetup is used to conveniently setup dm-crypt managed device-mapper mappings. These include plain dm-crypt volumes and LUKS volumes. The difference is that LUKS uses a metadata header and can hence offer more features than plain dm-crypt...




• Installing Cryptsetup:
sudo apt install cryptsetup


***SETUP***

• Creating a container:
dd if=/dev/urandom of=~/my_encrypted_drive.dd bs=1M count=256

• Format it:
sudo cryptsetup luksFormat ~/my_encrypted_drive.dd

• Opening it:
sudo cryptsetup luksOpen ~/my_encrypted_drive.dd my_drive
my_drive will appear in /dev/mapper/.

• Create a filesystem within it:
mkfs -t ext4 /dev/mapper/my_drive

• Mount the container:
sudo mount -t ext4 /dev/mapper/my_drive ~/mnt/


***Consequence run***

sudo cryptsetup luksOpen ~/my_encrypted_drive.dd my_drive
sudo mount -t ext4 /dev/mapper/my_drive~/mnt/


• Unmounting:
sudo umount ~/mnt/
sudo cryptsetup luksClose my_drive


• Changing Password/Passphrase:
sudo cryptsetup luksChangeKey my_encrypted_drive.dd

• for more usage and help:
cryptsetup --help
man cryptsetup

Read more at Cryptsetup Homepage and Wikipedia .


note:
device => my_encrypted_drive.dd


Disclaimer

15 July 2015

Data Security: EncFS

Data Security: EncFS

ENCFS

according to the MAN page:

encfs - mounts or creates an encrypted virtual filesystem

..EncFS creates a virtual encrypted filesystem which stores encrypted data in the rootdir directory and makes the unencrypted data visible at the mountPoint directory. The user must supply a password which is used to (indirectly) encrypt both filenames and file contents...

    Advantages of EncFS:
  • Does not require root privilages.
  • Easy, simple to setup and carry.
  • No dependencies.
  • Able to enlarge storage as long as the HDD space is available.
  • Storage capacity not limited by fixed size encryption container like in truecrypt etc.



• Installing encfs :
on Debian system.
sudo apt-get install encfs

• We need to create two folder :
(one for encrypted folder and another for mount point/folder).
mkdir <ENCRYPTED FOLDER> <MOUNT FOLDER>
mkdir ~/encfs/ ~/mnt/


• Setup :
encfs ~/encfs/ ~/mnt/
thing to remember, the path must be absolute. ie- /home/user/mnt   or   ~/mnt   and not   mnt .
Since we are mounting it for the first time it'll prcode_innerompt for a setup and a password. it's fairly easy.

• Mounting encrypted folder :
encfs ~/encfs/ ~/mnt/
To encrypt any file(s), save them in the ~/mnt/ folder.it will be visible in plain sight.
if you look at the ~/enfs/ folder, you will see the encrypted raw files. that is the real files. Everything in ~/mnt/ is a mirror of the files in ~/encfs/.

• Unmounting the encrypted folder :
umount ~/mnt/


Extra's

• Displaying Info:
encfsctl <ENCRYPTED_FOLDER>
encfsctl info <ENCRYPTED_FOLDER>

encfsctl ~/encfs/
encfsctl info ~/encfs/


• Changing password:
encfsctl passwd <ENCRYPTED_FOLDER>
encfsctl passwd ~/encfs/


• For usage and option's :
encfs --help
man encfs

Read more at EncFS Homepage and Wikipedia .

04 July 2015

Unix tricks: Create a Portable Drive

Unix Tricks: Create a Portable Drive

Create a Portable Drive
unix tricks

Unix Tricks

• Create a blank file of 256 MB :
dd if=/dev/zero of=~/portable.drive bs=1M count=256

• Create an ext4  filesystem within the file:
mkfs -t ext4 ~/portable.drive
you can replace ext4 with ext2, ext3, vfat, msdos, minix etc.

• Create a mount point:
mkdir ~/mnt/

• Mount the File/Drive:
sudo mount -t ext4 ~/portable.drive ~/mnt/
  ••Now you can browse the drive••

• Unmount the drive:
sudo umount ~/mnt/

    Advantages
  • Easy to carry files stored in one container.
  • Good for hiding data and files from plain sight.if you share your computer with others
  • Usable across unix System.
    Disadvantages
  • No security or encryption set/applied.
  • Cannot be viewed, opened in Windows natively.


note:
The file created by this method can only be open and read by unix and unix-like system. Natively Windows cannot open this kind of file. but its possible to open it with Cywin
software.

letter-spacing:1px; letter-spacing:1px; Disclaimer