Effective Phishing With GoPhish
Effective Phishing With GoPhish
Effective Phishing With GoPhish
with
GOPHISH
2
PHISHING OVERVIEW
Why is this important?
“
4
ABOUT THIS TALK
For beginners
(although 1337 SE’s may learn something, too)
And finally…
5 5
…ITS FUN TO DO BAD THINGS.
6
PHISHING BY
THE NUMBERS
For the C-Levels
7
33% 32% 29%
of breaches in 2018 of breaches in 2018 of breaches in 2018
involved social involved phishing used stolen
engineering credentials
https://enterprise.verizon.com/resources/reports/2019-data-breach-investigations-report.pdf
8
78%
…of all espionage incidents involved phishing
https://enterprise.verizon.com/resources/reports/2019-data-breach-investigations-report.pdf
9
OVERVIEW
10
GOPHISH FRAMEWORK
https://getgophish.com/
• Mature and Robust
• Actively Maintained
• GUI and API
• FREE
11
GOPHISH SETUP IN 5 MINUTES
12
GOPHISH SETUP IN 5 MINUTES
On your host:
$ ssh user@ip_or_hostname
On your server:
$ sudo apt-get update && sudo apt-get –y install golang unzip
$ wget https://github.com/gophish/gophish/releases/download/v0.8.0/gophish-v0.8.0-linux-64bit.zip
$ sudo unzip gophish-v0.8.0-linux-64bit.zip –d /opt/gophish
$ cd /opt/gophish
$ tmux new –s gophish *
$ sudo ./gophish
* Optional, kinda
13
GOPHISH SETUP IN 5 MINUTES
• Log In
On your host:
$ ssh –Nf –L3333:localhost:3333
user@ip_or_hostname
In your browser:
https://127.0.0.1:3333
Username: admin
Password: gophish
14
….but it doesn’t do anything yet.
15
BUILDING A CAMPAIGN: THE PIECES
16
BUILDING A CAMPAIGN: MIX AND MATCH!
GROUP: Executives Email: Your password has Page: Office 365 Sending Profile:
expired AWS SES
GROUP: IT
Page: Intranet Sending Profile:
Email: Secure Message from
Human Resources Exchange
GROUP: Cust Svc
Page: Phishing
Email: Changes to Dress Code Training Sending Profile:
17
LETS BUILD A CAMPAIGN!
18
LETS BUILD A CAMPAIGN! Sending Profile
19
LETS BUILD A CAMPAIGN! Sending Profile
20
LETS BUILD A CAMPAIGN! Users and Groups
21
LETS BUILD A CAMPAIGN! Users and Groups
22
LETS BUILD A CAMPAIGN! Landing Page
23
LETS BUILD A CAMPAIGN! Landing Page
24
LETS BUILD A CAMPAIGN! Landing Page
25
LETS BUILD A CAMPAIGN! Landing Page
26
LETS BUILD A CAMPAIGN! Email Template
27
LETS BUILD A CAMPAIGN! Email Template
28
LETS BUILD A CAMPAIGN! Variables
You may have noticed code such as {{.FirstName}} in previous slides. These are variables
that draw from other parts of GoPhish to customize a campaign.
Variables Source
29
LETS BUILD A CAMPAIGN! Variables
You may have noticed code such as {{.FirstName}} in previous slides. These are variables
that draw from other parts of GoPhish to customize a campaign.
{{.LastName}}
{{.Email}}
{{.FirstName}} {{.Position}}
30
LETS BUILD A CAMPAIGN! Creating The Campaign
- Sending Profile
- User Group
- Email Template
- Landing Page
31
LETS BUILD A CAMPAIGN! Creating The Campaign
- Sending Profile
- User Group
- Email Template
- Landing Page
Note: As of this version, GoPhish doesn’t have a dropdown for the
URL. Be sure this is typed correctly and uses the correct protocol!
32
LETS BUILD A CAMPAIGN! Sending The Campaign
33
LETS BUILD A CAMPAIGN! Sending The Campaign
34
LETS BUILD A CAMPAIGN! Sending The Campaign
35
LETS BUILD A CAMPAIGN! Sending The Campaign
Selecting a user and scrolling down gives a detailed timeline, and all
submitted data. We’ve now got credentials to continue our attack.
36
Now that we can phish,
lets talk Phishing
Strategy
37
BLUE TEAM
38
GOALS: Blue Team
39
GOALS: Blue Team
https://twitter.com/jw_sec
40
GOALS: Blue Team
41
GOALS: Blue Team
42
GOALS: Blue Team
Phishing Lifecycle:
Only the latest step is reported in the “Results” output
Email Submitted
Email Sent Clicked Link
Opened Data
43
GOALS: Blue Team
https://github.com/chrismaddalena/GoReport
44
GOALS: Blue Team
What level of
sophistication gets
spotted/reported? Which
slips through?
45
GOALS: Blue Team
46
GOALS: Blue Team
47
GOALS: Blue Team
48
GOALS: Blue Team
49
GOALS: Blue Team
50
RED TEAM
51
GOALS: Red Team
• Capture Credentials
• Deliver Payloads
52
GOALS: Red Team
• Capture Credentials
• Raw Capture
• Log in to service
53
GOALS: Red Team
• Capture Credentials
• Raw Capture
• Log in to service
54
GOALS: Red Team
• Capture Credentials
• Raw Capture
• Log in to service
55
GOALS: Red Team
• Capture Credentials
• Raw Capture
• Log in to service
56
GOALS: Red Team
• Deliver Payloads
• Email Attachment
• Host and redirect
57
GOALS: Red Team
• Deliver Payloads
• Email Attachment
• Host and redirect
58
GOALS: Red Team
• Deliver Payloads
• Email Attachment
• Host and redirect
59
TARGET
COLLECTION
The important part
60
TARGET COLLECTION
61
TARGET COLLECTION
Blue:
62
TARGET COLLECTION
Red:
63
TARGET COLLECTION
Automation
64
TARGET COLLECTION
Automation: Lure
65
BEST PRACTICES
Increasing Effectiveness
66
GENERAL TIPS: HTTPS
Configure HTTPS!
By default, GoPhish uses a self-signed certificate. This isn’t good if you want a
successful campaign.
- Use LetsEncrypt!
- After issuing a certificate, add the path to config.json and enable TLS:
"use_tls": true,
"cert_path": ”/etc/letsencrypt/live/domain/fullchain.pem",
"key_path": ”/etc/letsencrypt/live/domain/privkey.pem"
67
GENERAL TIPS: HTTPS
If you host multiple phishing domains, consider configuring a TLS certificate with
Subject Alternative Names:
68
GENERAL TIPS: TRANSPARENCY
“X-Mailer: GoPhish”
“X-Gophish-Contact: admin@domain.com”
69
GENERAL TIPS: TRANSPARENCY
gophish/models/maillog_test.go
gophish/models/maillog.go
gophish/models/smtp_test.go
gophish/models/email_request.go
gophish/models/email_request_test.go
70
GENERAL TIPS: MAIL SERVERS
Sure, you can install up Sendmail and get your DNS records configured…
Consider using a high reputation mail server; many are available for free under a certain
threshold (usually around ~10,000 emails per month.) Ex: Amazon SES, Sendgrid
71
TAKEAWAYS
In summary…
72
KEY TAKEAWAYS
Attackers aren’t just hitting your external hosts and giving up – educate and
prepare your users.
Numbers talk – baselining your users’ social engineering readiness will get
initiatives pushed through faster.
73
THANKS!
ANY QUESTIONS?
@highmeh
74