User Tools

Site Tools


installing_lucy_on_linux

Table of Contents

Install LUCY using the Linux install script (install.sh)

How much time is required?

The installation is very simple and straight forwarded. After downloading and executing the installer script everything will run automatically in the background. Depending on your internet connection speed an installation can take 30-60 minutes.

Which OS is required for the default docker installation of LUCY?

LUCY supports docker and therefore runs on all known Linux systems (https://www.docker.com/). Docker Engine is supported on Linux, Cloud, Windows, and OS X. Installation instructions are available for the following:

On Linux:

  • Arch Linux
  • CentOS
  • CRUX Linux
  • Debian
  • Fedora
  • FrugalWare
  • Gentoo
  • Oracle Linux
  • Red Hat Enterprise Linux
  • openSUSE and SUSE Linux Enterprise
  • Ubuntu

The shell script will check if your system has already docker installed. If not, it will guide you through the installation process and install all necessary components automatically.

General Preparation

  • Make sure you have openssl installed: You can do this by typing "apt-get install openssl" in the terminal.
  • Make sure you use an updated list of repositories: Get the latest list by typing "apt-get update" (apt-get update downloads the package lists from the repositories and "updates" them to get information on the newest versions of packages).
  • Make sure you have the latest PEM files: Run "apt-get install ca-certificates". This package includes PEM files of CA certificates to allow SSL-based applications to check for the authenticity of SSL connection.
  • Make sure you have enough disk space in your temp drive: Free some space by using "umount /tmp" in case there is not enough space. In general, the LUCY installation requires at least 100 GB HDD. Other hardware requirements are described here.

Can I run other applications on the same server?

It's highly recommended to install LUCY on a separate virtual or physical host (VPS or dedicated server) as LUCY's shell installer is pretty intrusive and may disrupt other custom software packages installed on the host. Make sure no other applications are running on that host which use same ports as LUCY (like a mail server running on 25 or a web server running on port 80).

What minimal packages are needed for the installer to work?

Make sure you have an updated repository list and the following packages installed:

  • openssl
  • ca-certificates
  • net-tools

What are the hardware/Disk requirements?

  • TMP: You will need at least 2 GB Space in the tmp directory. Please unmount your tmp in case you need to free some space there (example: "umount /tmp")
  • Other hardware requirements can be found here

Installation tutorial

Important notice: If you use a Red Hat Linux, before running the LUCY installation script, please deploy Docker manually.
This article is pretty handy for instances without active subscriptions.

1) Open the Terminal from the Menu "Accessories \ Terminal".
2) From your Terminal, use wget to download the installation file:
Ubuntu 20.04: "wget https://download.phishing-server.com/dl/lucy-latest/install-20.04.sh"
Ubuntu 22/04: "wget https://download.phishing-server.com/dl/lucy-latest/install-22.04.sh"
3) Then type chmod +x name_of_file.sh to make your file executable (example "chmod +x install.sh").
4) Now type ./name_of_file.sh to execute the file (Example "./install.sh").
5) You will be asked if you want to install LUCY (Install LUCY (y/n)?) Please type "y" and press enter. During the installation, LUCY will connect to our centralized custom repository to download the necessary packages.
6) As soon as the installation is finished, the automatic setup script should start.

97.jpg

7) Login to LUCY with the Webbrowser. Continue the setup in the browser using the credentials provided in the setup script. If you want to install a commercial version, please provide us with the workstation ID.

8) Define your default mail delivery method in LUCY. In case you use the build in mail server: set the hostname for the mail server.

9) Setup a domain in LUCY. This domain can be used for phishing simulations (landing pages) or the elearning portal.

10) Create a trusted certificate for the administration of LUCY.

11) Create all the required administrators users in LUCY.

12) Download all the latest templates

14) Update LUCY to the latest version

15) Consider implementing additional security layers

16) Give LUCY a custom branding

17) Once you are all set you can try to setup your first campaign. If you experience issues with mail delivery (e.g. SPAM filtering), check out this chapter. If your test emails do not arrive at all, please consult this article.

Start the installation script manually after a successful installation

Execute the command
python /opt/phishing/current/tools/setup/setup.py

or in LUCY > 2.8:
docker exec -it lucy /bin/bash
python /opt/phishing/current/tools/setup/setup.py

Installation problem? Contact our support

In case you are planning to purchase LUCY or you are already a commercial client you can contact support@lucysecurity.com to open a ticket. We will get in touch with you within 24 hours.

Uninstall LUCY

If you want to remove LUCY you first need to get a list of all packages installed using the command (which displays installed packages in historical order, and then purges the last packages):

awk '/^Selecting/ {gsub(/\./,""); print $5}' /var/log/apt/term.log

That list will enable you to remove the according packages. This method works for legacy installation method only.

For Docker-based installation you simply need to stop the container and remove it:

docker stop lucy
docker ps -a
docker container rm <CONTAINER ID>

Frequently asked questions (FAQ)

Which components are installed with the installer script? What modifications are made to Linux OS by the installer?

When Lucy is installed as a docker image, it gets downloaded from https://hub.docker.com (you can search for Lucysecurity there) to internal docker storage that is managed by docker itself – as any other usual docker image. Usually it’s /var/lib/docker/. After that the installer launches the image with specific parameters, extracts a management script (that launches Lucy’s console setup tool) to /tmp/files, moves it to /usr/bin/lucy-setup.sh and removes the /tmp/files folder. These are all changes that the docker-based installer does, all other software and files are within the container.

When installing Lucy in a "legacy" way (which is possible only for Ubuntu 20.04, as the installer requires some Ubuntu-specific packages and software versions), the installer adds around 500 new packages, does very deep system changes, including configuring the login shell, changing other services (postfix, apache, etc).

In case if you use Red Hat, please look at the important notice in the Installation tutorial section.

What if I ran the install.sh on Red Hat without manually installing Docker?

Our installation script actually does not deploy Docker itself. It pulls Docker Installation script from https://get.docker.com/. For some reason, Docker installation script adds a repo which is not operational. To remove the repo, simply run the command below:
yum-config-manager –disable docker-ce-stable

The installer checks if docker is installed and installs it from the official docker website. Are there any downsides of having docker engine pre-installed?

No, pre-installed docker engine is just fine and will work completely the same. Just make sure it will be updated on time.

Who patches the Docker Runtime and host Linux system when security vulnerabilities become known?

When using a Docker-based installation, the Docker engine and all packages on the host are managed by the host package management system – be it RHEL package management or Debian/Ubuntu APT. Lucy’s docker container has no access to outer system and therefore cannot install any updates there. When using a "legacy" installation, all software packages are updated along with Lucy updates using Lucy's Ubuntu mirrors.

How does Lucy update when it’s running in Docker?

After installing a Docker container with Lucy, Docker's container system is not involved anymore - all updates are performed within the container using container's APT system with our custom package mirror.

Is the docker-image included in the installer payload or is the docker-image loaded via docker pull?

Lucy's docker-image gets downloaded from https://hub.docker.com (official Docker Hub) during installation.

When configuring proxy in Lucy, what software is affected?

In case of Docker installation, only software inside the container is affected. There are no consequences for the software on the host system. When using a legacy installer, the proxy configured will be used as a default proxy for the whole Linux system.

How do you back up Lucy?

Speaking of Docker container installation, the backup is seamless and is a piece of cake. First of all you "commit" the container, making a static image of it with all files, changes, etc: docker commit lucy lucy-backup After that you:

  • either save it as a tar file: docker save -o /path/to/lucy-backup.tar lucy-backup
  • or export it to your private docker registry: docker push lucy-backup

The backup image can be recovered easily from file by docker load -I /path/to/lucy-backup.tar (in case of local file) or docker pull lucy-backup (in case of private docker registry)

After that you can start your container as a regular docker container with this command: docker run –privileged -v /proc/sysrq-trigger:/sysrq -d -p 80:80 -p 443:443 -p 25:25 -p 5001:5001 –name lucy –restart=always lucy-backup /bin/bash /etc/run-services.sh

Things get a bit more difficult in case of "legacy" installation - you should back up multiple directories, where configurations and files are stored:

  • /opt/phishing
  • /etc/
  • /var/lib
installing_lucy_on_linux.txt · Last modified: 2024/10/08 12:16 by editor6