GoPhish – phishing campaign simulator – part 2

In previous post I have showed you capabilities of GoPhish software after installation. Today will show you how to install and configure it under Linux.

In my environment I used VPS bought on OVH for 20 PLN, what is about 4 EUR. Configuration of that VPS is 1 core, 2 GB RAM and 20 GB of storage. As a system I used Debian 11. In addition I bought also domain. For that domain I generated free 3-months SSL certificate on ZEROSSL.com. In this post on that blog you can find tutorial how to get that certificate.

Go installation

Because GoPhish has been written in GO language, first we have to install it on server. At the beginning we need to install curl, to be able to download newest release of GoPhish.

Next , on Go language website we need to check what is the newest version. According to that command could be different.

The next step will be decompression of files and granting proper permissions.

GoPhish installation

GoPhish can be downloaded from github. To do it you need to install git package and then download gophish files.

Files are zipped in a *.zip format. If we dont have unzip installed, need to proceed it..

And then unpack it.

Sendmail installation

Before we go to GoPhish configuration, let’s install sendmail packet, which will be used to mail sending.

After installation we have to configure it. We need to configure SMTP protocol. Inside /etc/mail create new folder and grant permissions.

In file gmail-auth put logon data to email account. If you are using gmail you need to create application password. For Google you will find tutorial here. In Gmail, to be able to create application password you need before enable MFA. When you have already password generated put in in opened file. Format of tat file looks like that.

Save the file and need to prepare hash database map.

Now we need to edit /etc/mail/sendmail.mc. At the end replace the section MAILER_DEFINITIONS for that below. If you are using different mail provider, you need to use another SMART_HOST address.

Last step is rebuild configuration and restart of sendmail.

Now we can send test mail.

In case of error: 554 5.2.252 SendAsDenied; mail@domena.com not allowed to send as root@vps…

you need to put in the command from parameter.

GoPhish configuration

After we have configured all tools used by GoPhish, we need to configure GoPhish itself.

This config is simple, need to edit file config.json, which is located in main folder in the downloaded package. My config looks like that.

Explaination of options possible to be configured you can find in the documentation under link. I will put here fragment of doc with information of visible parameters.

Source: https://docs.getgophish.com/user-guide/installation

After saving configuration file you can run gophish by using command:

After first run, on the console you will se admin password which has to be changed after first login.

Below you can find links to GitHub when there is a lot of mails and landing pages html codes:

  1. https://github.com/FreeZeroDays/GoPhish-Templates
  2. https://github.com/criggs626/PhishingTemplates

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *