Sunday, April 24, 2016

Disabling automount

Kali comes with automount enabled by default. A simply test is by attaching an USB pen drive: if this gets automatically recognised as a storage system and you can have access directly to the content of it, then the automount is enabled.

Another way is to go to Files and when right clicking the USB storage system, the option Umount will appear in the list. 

The idea is to not have automount enabled due to a potential written access to the evidence accidentally. The storage system requires to be mounted with read only permissions, so an image can be created without altering the information sitting in this place.

In order to disable automount, please follow the below steps:
  1. Go to Terminal and open dconf Editor with the following command:
    dconf-editor (if this is not install, you have to run dconf-tools first).
  2. Once having the dconf Editor opened, select on the left side the schema org > gnome > desktop > media-handling option.
  3. Check if the options automount and automount-open are checked. The first option (automount) is for whether to automatically mount media. The second option (automount-open) is to whether to automatically open a folder for automounted media. I have disable these two:
  4. Also during this project, I am checking the option autorun-never. This is to never prompt or autorun/autostart programs when media are inserted.
If you do not want to install anything in your syste, it is possible to use the command gsettings and get the dconf keys changed manually.

The command to disable Nautilus automount:
gsettings set org.gnome.desktop.media-handling automount false for disabling, and true for enabling.