kgretzky / evilginx

PLEASE USE NEW VERSION: https://github.com/kgretzky/evilginx2
MIT License
1.07k stars 260 forks source link

Failed to start Nginx daemon #41

Closed thehappydinoa closed 3 years ago

thehappydinoa commented 6 years ago
Installing Evilginx daemon...

Synchronizing state of nginx.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable nginx
Job for nginx.service failed because the control process exited with error code.
See "systemctl  status nginx.service" and "journalctl  -xe" for details.
[-] Failed to start Nginx daemon.
systemctl  status nginx.service
● nginx.service - The NGINX HTTP and reverse proxy server
   Loaded: loaded (/etc/systemd/system/nginx.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Thu 2017-10-12 15:54:09 EDT; 34s ago
      CPU: 3ms

Oct 12 15:54:09 aidan-laptop systemd[1]: Starting The NGINX HTTP and reverse proxy server...
Oct 12 15:54:09 aidan-laptop nginx[22458]: nginx: [emerg] dlopen() "/etc/nginx/nginx/modules/ngx_http_au
Oct 12 15:54:09 aidan-laptop nginx[22458]: nginx: configuration file /etc/nginx/nginx.conf test failed
Oct 12 15:54:09 aidan-laptop systemd[1]: nginx.service: Control process exited, code=exited status=1
Oct 12 15:54:09 aidan-laptop systemd[1]: Failed to start The NGINX HTTP and reverse proxy server.
Oct 12 15:54:09 aidan-laptop systemd[1]: nginx.service: Unit entered failed state.
Oct 12 15:54:09 aidan-laptop systemd[1]: nginx.service: Failed with result 'exit-code'.

Help please, running using Kali GNU/Linux Rolloing

poweroftrue commented 6 years ago

Hello @thehappydinoa Evilginx only support Debian right now but you can help us in the experiment docker image here: https://github.com/kgretzky/evilginx/pull/45

You should able to run this on any operating system with Docker installed.

thehappydinoa commented 6 years ago

@poweroftrue Kali-Rolling is Debian...

acordeonmorado commented 6 years ago

Thehappydinoa, same issue. Any solution?

thehappydinoa commented 6 years ago

@acordeonmorado not yet

acordeonmorado commented 6 years ago

Anybody help?????

acordeonmorado commented 6 years ago

thehappydinoa. Try another kali distro. It works.

abdozekaa commented 6 years ago

am getting this error too ... waiting for help!

kgretzky commented 6 years ago

Evidently /etc/nginx/nginx.conf is having an error and it is failing, what I gather from the error output. Can you post here the contents of that file?

MaxGomas commented 6 years ago

Hi, same issue, here my /etc/nginx/nginx.conf.

user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;

events {
    worker_connections 768;
    # multi_accept on;
}

http {

    ##
    # Basic Settings
    ##

    sendfile on;
    tcp_nopush on;
    tcp_nodelay on;
    keepalive_timeout 65;
    types_hash_max_size 2048;
    # server_tokens off;

    # server_names_hash_bucket_size 64;
    # server_name_in_redirect off;

    include /etc/nginx/mime.types;
    default_type application/octet-stream;

    ##
    # SSL Settings
    ##

    ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
    ssl_prefer_server_ciphers on;

    ##
    # Logging Settings
    ##

    access_log /var/log/nginx/access.log;
    error_log /var/log/nginx/error.log;

    ##
    # Gzip Settings
    ##

    gzip on;

    # gzip_vary on;
    # gzip_proxied any;
    # gzip_comp_level 6;
    # gzip_buffers 16 8k;
    # gzip_http_version 1.1;
    # gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;

    ##
    # Virtual Host Configs
    ##

    include /etc/nginx/conf.d/*.conf;
    include /etc/nginx/sites-enabled/*;
}

#mail {
#   # See sample authentication script at:
#   # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
# 
#   # auth_http localhost/auth.php;
#   # pop3_capabilities "TOP" "USER";
#   # imap_capabilities "IMAP4rev1" "UIDPLUS";
# 
#   server {
#       listen     localhost:110;
#       protocol   pop3;
#       proxy      on;
#   }
# 
#   server {
#       listen     localhost:143;
#       protocol   imap;
#       proxy      on;
#   }
#}
mathieu-aubin commented 6 years ago

The problem is that /etc/nginx/nginx/modules folder doesn't exist as its normally supposed to be /etc/nginx/modules (which is a symlink to /usr/lib64/nginx/modules -- in redhat-related anyways)

I suggest looking the the file "ngx_http_au" (we can't see the complete filename) in your computer (if anything debian/ubuntu there's a chance it might be located somewhere in /usr/lib/nginx or the likes /usr/lib/nginx/modules )

once you know where the file is, you can:

mkdir -p /etc/nginx/nginx
ln -s /usr/lib/nginx/modules/ /etc/nginx/nginx/modules
nginx -t

if you end up with more garbage, check your nginx.conf and change the loadmodule line if it points somewhere not correct

Hope that helps

MaxGomas commented 6 years ago

Thanks for that, I will search.

I have a question/suggestion, isn't it possible to link evilginx with ngork? I mean Social Fish already do that but only for credentials.

It could be awesome to let people to use localhost, even domain name will be less realistic, you were not obligated to buy one !

Thanks to you.

mathieu-aubin commented 6 years ago

edit your /etc/hosts file (under linux, as admin) and add your ip address followed by whatever domain you'd like.... (add a line to the file, similar to this one but with a ip that works for you)

127.0.0.1 domain.fake www.domain.fake

then change or add a server_name line to your nginx server block

server {
    listen 80;
    listen [::]:443;
    server_name domain.fake;
    server_name www.domain.fake;
    .....
    ......
}

assuming you have all the correct ports open ... trying http://domain.fake in your browser you return to your local nginx server

As for the question -- i have no idea how evlginx works i havnt played with it. I do lots of nginx in general tho..