Security Art Work

Blog de Seguridad de la Información de S2 Grupo

Un blog de

Phishing: improving our campaigns

11 de January de 2018 Por Kevin Borras

One of the most important things when carrying out a phishing campaign [Obviously, always from legal terms Ed.] is to ensure that our mail gets to evade the anti-spam filters and thus be able to reach the victim’s inbox.

In this post we are not going to explain how Gophish, que ya hemos mencionado en algún post, we will simply explain a series of steps to follow to make our emails more reliable. It is worth adding that following these steps does not ensure 100% success, each mail manager has its own filtering rules.

We start from the basis that Gophish is already installed, so the next step would be to obtain a domain and make a series of changes in DNS administration.

First of all we are going to establish a new SPF registry that is in charge of identifying the mail servers that can send messages on behalf of our domain.

The SPF record would be as follows:

TXT        @           v=spf1 a mx ip4:IP ~all

Where:

  1. v: used version of spf.
  2. mx: authorize the machines with the IP of the MX records.
  3. Ip: the ip of the vps where GoPhish is.
  4. ~all: disavows machines that do not fit explicitly authorized.

Then we add an A record, these records link a domain with the physical IP address of a computer that hosts the services of that domain.

It would be as follows:

A             @           IP

To finish, we have the MX record which is the one that defines which is the email server for the domain.

For example, it could be:

MX         @           smtp.nuestrodominio.com

Once finished with the records, another important step is to check that when our landing page is accessed, the IP address does not appear, but that of the domain name. And since ‘a picture is worth a thousand words’, here is what it would look like:

With this we terminate all DNS settings, and our next step will be the configuration and installation of a free software mail server, in this case Postfix.

From our terminal we write:

[RedTeam] > ~: sudo apt-get install postfix

Once installed it will be necessary to make some modifications in the configuration file found in /etc/postfic/main.cf, it will be important to make changes in the parameters:

  • myhostname: here we specify the name FQDN (fully qualified domain name).
  • mydomain: here we will have to specify the domain name
  • mynetworks: here we define which networks or hosts can send mail through our Postfix.
  • mydestination: specifies the domains that the team will use to deliver the mail locally, this line can be commented on.

For the changes to take effect we will have to restart the service with:

[RedTeam] > ~: sudo service postfix restart

With all these changes we have made we still need to change something else, this time in Gophish.

When creating a sending profile, we must take into account that the Host field has to be modified (by default it comes as localhost: 25), we will have to modify it by the name that we have put in the MX record.

This small detail is quite important, because if we leave it by default in the mail headers, ‘localhost’ will appear and it will subtract points from our mail.

Now that we have everything modified, how do we check the level of spam in our mail? Well, very easy, there are various on-line tools that allow us to obtain an indicator of this.

One of the ones I liked the most was https://www.mail-tester.com/ which allows us to analyze up to 3 emails a day for free. We can register an account to get 20 analyses or, if we do not want to give data, use different IP addresses.

And in addition, we can see in detail where we have failed, and in this way we can adjust the settings of postfix, Gophish and our email template in order to improve the score:

We would like to finish by thanking Alberto Sáez and Pablo Arias for the help they have given in collecting all this information to improve the phishing campaigns.

References

https://es.godaddy.com/help/administrar-dn

FacebookX (Twitter)LinkedIn

See also in:

  • Español
  • Español

Pages

  • About
  • Authors
  • Cookies Policy
  • Guest posts
  • Legal Notice
  • Privacy Policy

Search

Authors

  • Antonio Villalón (228)
  • Manuel Benet (226)
  • Antonio Sanz (108)
  • Colaboradores (88)
  • Maite Moreno (73)
  • Roberto Amado (61)
  • José Rosell (59)
  • Joaquín Moreno (54)
  • Josemi Holguín (54)
  • Joan Soriano (52)
  • Jose L. Villalón (50)
  • José Vila (43)
  • Nelo Belda (43)
  • Antonio Huerta (38)
  • Fernando Seco (38)

All authors

Archives

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
  • Licencia de uso
Datos editoriales:
Publicación: securityartwork.es
Edita: S2 Grupo Soluciones de Seguridad, S.L.
Lugar de publicación: Valencia, España
ISSN 3101-5913

Return to top of page

Copyright © 2026 · Genesis Framework · WordPress

Utilizamos cookies propias y de terceros para mejorar y analizar el uso que haces de nuestro site. Puedes cambiar la configuración, rechazarlas u obtener más información sobre nuestra política de cookies AQUÍ. Aceptar
Política de cookies

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Non-necessary
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
SAVE & ACCEPT