kgretzky / evilginx2

Standalone man-in-the-middle attack framework used for phishing login credentials along with session cookies, allowing for the bypass of 2-factor authentication
BSD 3-Clause "New" or "Revised" License
10.5k stars 1.91k forks source link

Certificate issue? help! #201

Closed thecityofhereafter closed 5 years ago

thecityofhereafter commented 5 years ago

So I've figured out that my yaml file works.

If I leave phish_sub blank (so the certificate does NOT match) and click through "visit this site anyway" it will log credentials and session.

If I change phish_sub back to "accounts" it stalls after hitting "submit" username.

I know you can't help with the yaml file, but can I get a hint? is this because the original log-in page is trying to reach out to some other page not listed in the encryption certificate?

I used burpsuite to pick out every url for the auth process and cookies.. I'm not really sure what I'm doing wrong here, I've tried 10 different yaml files for this particular site, and each one behaves the same way for me?

Thanks, GM.

thecityofhereafter commented 5 years ago

This is in reference to a phishlet for google/gmail. I've tried all of the various attempts on the issue tracker along with combinations of my own, but they all seem to behave this way for me.

My boss is going to give me a raise if I can manage to phish my way into his gmail account, so I'm pretty determined here. I'd be willing to donate a few bucks to the project if someone could help me get this going, I've been able to make my own phishlets for a few other sites without any problems.

I've tried setting up records for certbot in my domain config so I can use wildcard certs on the subdomains, but that didn't seem to get around the issue I'm facing here. I'm about to pay a good chunk of change for a top level wildcard cert just to see if it helps, would be happier to put it towards the project and author instead.

Thanks, GM.

kgretzky commented 5 years ago

I can help you with specific error that you're getting if evilginx is not working as it should, but I am not able to help in creation of phishlets.

thecityofhereafter commented 5 years ago

Hey Kuba!

Thank You soo much for the replies! I had lost hope and tried switching to Modlishka but didn't have much luck there either. Ironically I had pretty much identical issues.

I'm going to give all your suggestions a try now. Thank You soo much.

I'll report back ASAP.

thecityofhereafter commented 5 years ago

I have what SHOULD be a working phishlet for the site in question, but I am still having issues with some weird domain name appends. It keeps appending verify.computer to the FQDN and giving me "hostname unsupported for accounts.google.com.verify.computer.verify.computer" I know you cant help with phishlets, and I understand entirely your reason for not releasing a phishlet for this particular site, but I am getting the same errors/behaviour no matter what phishlet I use, I did try deleting the crt folder and recreating the lures, it helped with some issues, but this one still remains. I have 2 yaml files for this site I have been trying, one from elktarni that is supposed to work, and one of my own that I created from scratch with a lot more triggers and some javascript to work through the push notifications issue, both seem to behave the same way...

For example: [20:50:12] [imp] [0] [google] new visitor has arrived: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.39 Safari/537.36 (104.34.29.226) [20:50:12] [inf] [0] [google] landing URL: https://accounts.google.com.verify.computer/gAtQsXdW [20:50:12] [dbg] redirect URL (lure): [20:50:12] [dbg] whitelistIP: 104.34.29.226 54683d1caa68854d3e48d1a69b551e5bbf152acd783bf22c4a5810b5c5e3f104 [20:50:12] [dbg] whitelistIP: 104.34.29.226 54683d1caa68854d3e48d1a69b551e5bbf152acd783bf22c4a5810b5c5e3f104 [20:50:12] [dbg] POST: /signin/v2/identifier [20:50:12] [dbg] accounts.google.com: GAPS = 1:81RmsTT3w8RCnHhVjBj7J6OaL6COQQ:kvoodQy9L7DdJJw6 [20:50:12] [dbg] hostname unsupported: accounts.google.com.verify.computer.verify.computer [20:50:13] [dbg] whitelistIP: 104.34.29.226 54683d1caa68854d3e48d1a69b551e5bbf152acd783bf22c4a5810b5c5e3f104 [20:50:13] [dbg] POST: /ServiceLogin [20:50:13] [dbg] accounts.google.com: GAPS = 1:Ddw0OC1DHmT6vMM9xbfDzpIQ9ku1JA:pqHh1xiPxcp18ehn [20:50:13] [dbg] hostname unsupported: accounts.google.com.verify.computer.verify.computer [20:50:13] [dbg] hostname unsupported: accounts.google.com.verify.computer.verify.computer [20:50:14] [dbg] DNS A: www.google.com.verify.computer. = 68.183.20.115 [20:50:15] [dbg] hostname unsupported: accounts.google.com.verify.computer.verify.computer [20:50:15] [dbg] hostname unsupported: accounts.google.com.verify.computer.verify.computer [20:50:22] [dbg] hostname unsupported: accounts.google.com.verify.computer.verify.computer [20:50:22] [dbg] hostname unsupported: accounts.google.com.verify.computer.verify.computer [20:50:25] [dbg] DNS A: accounts.google.com.verify.computer. = 68.183.20.115 [20:50:25] [dbg] DNS A: google.com.verify.computer. = 68.183.20.115 [20:50:25] [dbg] DNS A: accounts.google.com.verify.computer. = 68.183.20.115 [20:50:26] [dbg] isWhitelistIP: 46.105.100.220 [20:50:26] [war] [google] unauthorized request: https://accounts.google.com.verify.computer/ (python-requests/2.18.4) [46.105.100.220] [20:50:35] [dbg] DNS A: accounts.google.com.verify.computer. = 68.183.20.115 [20:50:36] [dbg] isWhitelistIP: 3.88.239.114 [20:50:36] [war] [google] unauthorized request: https://accounts.google.com.verify.computer/ (Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv:11.0) like Gecko) [3.88.239.114] [20:50:36] [dbg] DNS A: accounts.google.com.verify.computer. = 68.183.20.115 [20:50:36] [dbg] DNS A: drive.google.com.verify.computer. = 68.183.20.115 [20:50:36] [dbg] DNS A: accounts.google.com.verify.computer. = 68.183.20.115 [20:50:36] [dbg] isWhitelistIP: 3.88.239.114 [20:50:36] [war] [google] unauthorized request: https://accounts.google.com.verify.computer/ (Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv:11.0) like Gecko) [3.88.239.114] [20:50:39] [dbg] isWhitelistIP: 46.105.100.220 [20:50:39] [war] [google] unauthorized request: https://accounts.google.com.verify.computer/ (python-requests/2.18.4) [46.105.100.220] [20:50:42] [dbg] DNS A: fonts.google.com.verify.computer. = 68.183.20.115 [20:50:43] [dbg] isWhitelistIP: 46.105.100.220 [20:50:43] [war] [google] unauthorized request: https://accounts.google.com.verify.computer/ (python-requests/2.18.4) [46.105.100.220] [20:50:43] [dbg] DNS A: google.com.verify.computer. = 68.183.20.115 [20:50:43] [dbg] DNS A: accounts.google.com.verify.computer. = 68.183.20.115 [20:50:44] [dbg] DNS A: ogs.google.com.verify.computer. = 68.183.20.115 [20:50:45] [dbg] isWhitelistIP: 195.242.213.154 [20:50:45] [war] [google] unauthorized request: https://accounts.google.com.verify.computer/ (Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv:11.0) like Gecko) [195.242.213.154] [20:50:47] [dbg] DNS A: play.google.com.verify.computer. = 68.183.20.115 [20:50:47] [dbg] DNS A: ogs.google.com.verify.computer. = 68.183.20.115 [20:50:47] [dbg] DNS A: ogs.google.com.verify.computer. = 68.183.20.115 [20:50:48] [dbg] hostname unsupported: ogs.google.com.verify.computer [20:50:48] [dbg] DNS A: ogs.google.com.verify.computer. = 68.183.20.115 [20:50:48] [dbg] DNS A: ogs.google.com.verify.computer. = 68.183.20.115 [20:50:48] [dbg] hostname unsupported: ogs.google.com.verify.computer [20:50:48] [dbg] hostname unsupported: ogs.google.com.verify.computer [20:50:48] [dbg] DNS A: fonts.google.com.verify.computer. = 68.183.20.115 [20:50:48] [dbg] DNS A: fonts.google.com.verify.computer. = 68.183.20.115 [20:50:48] [dbg] hostname unsupported: ogs.google.com.verify.computer [20:50:48] [dbg] DNS A: fonts.google.com.verify.computer. = 68.183.20.115 [20:50:49] [dbg] isWhitelistIP: 195.242.213.154 [20:50:49] [war] [google] unauthorized request: https://accounts.google.com.verify.computer/ (Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv:11.0) like Gecko) [195.242.213.154] [20:50:49] [dbg] hostname unsupported: ogs.google.com.verify.computer [20:50:49] [dbg] isWhitelistIP: 195.242.213.154 [20:50:49] [war] [google] unauthorized request: https://accounts.google.com.verify.computer/ (Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv:11.0) like Gecko) [195.242.213.154] [20:50:49] [dbg] hostname unsupported: fonts.google.com.verify.computer [20:50:49] [dbg] hostname unsupported: fonts.google.com.verify.computer [20:50:49] [dbg] hostname unsupported: fonts.google.com.verify.computer [20:50:49] [dbg] hostname unsupported: fonts.google.com.verify.computer [20:50:50] [dbg] hostname unsupported: fonts.google.com.verify.computer [20:50:51] [dbg] DNS A: play.google.com.verify.computer. = 68.183.20.115 [20:50:51] [dbg] DNS A: play.google.com.verify.computer. = 68.183.20.115 [20:50:51] [dbg] DNS A: play.google.com.verify.computer. = 68.183.20.115 [20:50:51] [dbg] isWhitelistIP: 195.242.213.154 [20:50:51] [war] [google] unauthorized request: https://accounts.google.com.verify.computer/ (Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv:11.0) like Gecko) [195.242.213.154] [20:50:51] [dbg] hostname unsupported: play.google.com.verify.computer [20:50:51] [dbg] DNS A: play.google.com.verify.computer. = 68.183.20.115 [20:50:51] [dbg] hostname unsupported: play.google.com.verify.computer [20:50:51] [dbg] hostname unsupported: play.google.com.verify.computer [20:50:51] [dbg] hostname unsupported: accounts.google.com.verify.computer.verify.computer [20:50:51] [dbg] hostname unsupported: accounts.google.com.verify.computer.verify.computer [20:50:51] [dbg] hostname unsupported: play.google.com.verify.computer :

` name: 'google' author: '@elk' min_ver: '2.3.0' proxy_hosts:

`: phishlets get-hosts google

68.183.20.115 accounts.google.com.verify.computer 68.183.20.115 mail.google.com.verify.computer 68.183.20.115 drive.google.com.verify.computer

:
`

[20:50:01] [inf] debug output enabled [20:50:01] [inf] loading phishlets from: /usr/share/evilginx/phishlets/ [20:50:02] [dbg] DNS A: apis.google.com.verify.computer. = 68.183.20.115 [20:50:02] [dbg] DNS A: lh3.google.com.verify.computer. = 68.183.20.115 [20:50:02] [dbg] DNS A: play.google.com.verify.computer. = 68.183.20.115 [20:50:02] [dbg] DNS A: ogs.google.com.verify.computer. = 68.183.20.115 [20:50:02] [dbg] DNS A: play.google.com.verify.computer. = 68.183.20.115 [20:50:02] [inf] setting up certificates for phishlet 'google'... [20:50:02] [+++] successfully set up SSL/TLS certificates for domains: [accounts.google.com.verify.computer mail.google.com.verify.computer drive.google.com.verify.computer]

Any Suggestions?

Thank You so very much! I have 4 more days left to accomplish this task if I'm going to get a raise, but I'm kind of losing hope. :(

thecityofhereafter commented 5 years ago

Here is the YAML file I cobbled together from other claimed functional phishlets posted in the past.

`name: 'gl' author: '@ewhit' min_ver: '2.3.0' proxy_hosts:

thecityofhereafter commented 5 years ago

I have tried 3 other phishlets for this site in debug mode, and get the same exact problem "hostname unsupported: accounts.google.com.verify.computer.verify.computer"

Thanks.

`author: '@asmc' min_ver: '2.3.0' proxy_hosts:

thecityofhereafter commented 5 years ago

I have the DNS setup as follows:

Name Servers: ns-cloud-a1.googledomains.com ns-cloud-a2.googledomains.com ns-cloud-a3.googledomains.com ns-cloud-a4.googledomains.com

Registered Hosts: com.verify.computer 68.183.20.115

Custom Resource Records: @ A 5m 68.183.20.115

I want to use Modlishka and Evilginx2 on the same machine until I get one working, so I have acme records for Modlishka still in there, and I've set up Evilginx2 to manage DNS below com.verify.computer instead of the root domain verify.computer, is this a problem?

Thanks, GM

thecityofhereafter commented 5 years ago

I still cant get evilginx to STOP adding these extra subdomains and TLD's? and that new error where lets encrypt refuses to register a certificate for accounts.google.com.verify.computer is still happening when this phishlet was loading fine 5 days ago? made no changes to it.. help! please! I'm getting very desperate here.

kgretzky commented 5 years ago

Which domain provider did you use to register the domain? Make sure the nameservers are pointing to your host. You can find how to do it in the FAQ section in the wiki.