Skip to content

justin-p/ansible-role-evilginx

Repository files navigation

ansible-role-evilginx

Ansible Role Name Github Actions

A Ansible role that clones and builds the evilginx application, clones a (configurable) additional phishlet repository and starts evilginx in a tmux session.

Requirements

None.

Variables

defaults/main.yml

Variable Description Default value
evilginx_repo_author Used to built evilginx_url, can be updated to a alternative repo kgretzky
evilginx_repo_name Used to built evilginx_url,can be updated to a alternative repo evilginx2
evilginx_version Tag/Release/Branch to install v3.1.0
evilginx_url URL to clone evilginx repo from "https://github.com/{{ evilginx_repo_author }}/{{ evilginx_repo_name }}"
evilginx_install_destination Installation directory /opt/{{ evilginx_repo_name }}
evilginx_phishlets_repo_author Used to built evilginx_phishlets_url, can be updated to a alternative repo An0nUD4Y
evilginx_phishlets_repo_name Used to built evilginx_phishlets_url, can be updated to a alternative repo Evilginx2-Phishlets
evilginx_phishlets_version Tag/Release/Branch to install master
evilginx_phishlets_url URL to clone evilginx phishlet repo from "https://github.com/{{ evilginx_phishlets_repo_author }}/{{ evilginx_phishlets_repo_name }}"
evilginx_phishlets_install_destination Location where phishlets will be installed "/opt/{{ evilginx_phishlets_repo_name }}"

Dependencies

robertdebock.update_package_cache

robertdebock.core_dependencies

Example Playbooks

Default role installation

---
- hosts: evilginx_hosts
  become: yes
  tasks:
    - name: Run 'gantsign.golang'-role
      ansible.builtin.include_role:
        name: gantsign.golang
      vars:
        golang_install_dir: /opt/go

    - name: Run 'justin_p.evilginx'-role
      ansible.builtin.include_role:
        name: justin_p.evilginx
        apply:
          environment:
            PATH: "{{ ansible_env.PATH }}:/opt/go/bin"

Deployment playbook

This playbook is tested as part of the role CI.

---
- name: Deploy evilginx
  hosts: evilginx_hosts
  tasks:
    - include_role:
        name: robertdebock.update_package_cache
      tags: molecule-idempotence-notest
    - include_role:
        name: robertdebock.bootstrap
    - include_role:
        name: robertdebock.update
      vars:
        update_reboot: no
    - include_role:
        name: robertdebock.firewall
      vars:
        firewall_services:
          - name: ssh
          - name: http
          - name: https
    - include_role:
        name: robertdebock.hostname
      vars:
        hostname: evilginx.local
        hostname_reboot: no
     - include_role:
         name: gantsign.golang
        vars:
          golang_install_dir: /opt/go
    - include_role:
        name: justin_p.evilginx
        apply:
          environment:
            PATH: "{{ ansible_env.PATH }}:/opt/go/bin"

Local Development

This role includes molecule that will spin up a local docker environment to deploy, configure and test this role.

Development requirements:

  • Docker
  • Molecule
  • Molecule-docker
  • yamllint
  • ansible-lint

or simply use a VM with this configuration.

License

MIT

Authors

Justin Perdok (@justin-p), Orange Cyberdefense

Contributing

Feel free to open issues, contribute and submit your Pull Requests. You can also ping me on Twitter (@JustinPerdok)

About

A Ansible role that deploys the https://github.com/kgretzky/evilginx2 application and starts it in a tmux session.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published