Crypto lab: prerequisites

For this lab we need openssl.

  • The simplest way is to run hashcat inside docker. This will provide you with an environment that is identical to the one we used (all the examples will be exactly the same and you will be able to easily reproduce them all). See the instructions below.
  • Otherwise, you can install openssl in your laptop. Many linux distributions (including ubuntu in WSL on windows laptops) have it installed by default.

Using Docker

This provides you with an environment that is identical to the one we used (all the examples will be exactly the same and you will be able to easily reproduce them all).

  1. Install Docker CE from here (note: hashcat does not run correctly from the Linux VM with docker already installed )
  2. Run the docker image (automatic download)
    $ docker run --rm -it secunive/security1:crypto
    crypto@7f85c7886e48:~$ openssl
    ....

Note: if you experiment problems with memory in docker you can increase it from the advanced setting

Mounting a volume

You can mount a local folder as follows:

$ docker run --rm -it -v /fullpath/MyVolume:/tmp/MyVolume secunive/security1:crypto

The above command will mount your local folder /fullpath/MyVolume into /tmp/MyVolume in the docker container. In this way you can edit file locally and keep a copy of what you do (files are not preserved when you close the container).

NOTE: replace /fullpath/MyVolume with the path of the local folder you want to mount. Be sure that the folder exists before you start docker! If the folder does not exists, docker will create it as root and you won’t be able to use it.

How to start the lab

Go to Task 1