khast3x / Redcloud

Automated Red Team Infrastructure deployement using Docker
MIT License
1.2k stars 200 forks source link

Expose GoPhish #8

Open sudul opened 5 years ago

sudul commented 5 years ago

Hi, I’ve installed RedCloud on a AWS infrastructure (Kali, with all traffic authorized), and then installed GoPhish from the template. However, I have not been able to add any rules in Traeffik to expose the ports remotely. I’ve tried to modify the docker-compose file and I added some label to expose the 3333 GoPhish’s administration port from an URL with Traefik. The problem is that when I tried to access to the URL https://my-aws-ip/gophish/ I have an error: “500 internal server error”. When I install GoPhish on its own on the machine I can access to the GoPhish pages (https://my-aws-ip:3333) so it’s not an AWS rules problem. The listening URL for the GoPhish is 0.0.0.0:3333 in the configuration file. Here is the lignes that I added in the docker-compose file:

gophish:
  image: matteoggl/gophish
  container_name: “gophish”
  networks: 
    - default
    - inside
  volumes:
    - /var/run/docker.sock:/var/run/docker.sock
    - certs:/certs
    - logs:/logs
  labels:
    - “traefik.frontend.rule=PathPrefixStrip:/gophish”
    - “traefik.port=3333”
    - “traefik.passHostHeader=true”
    - “traefik.docker.network=default”
    - “traefik.frontend.redirect.regex=^(.*)/gophish$$”
    - “traefik.frontend.redirect.replacement=$$1/gophish/”
    - “traefik.frontend.rule=PathPrefix:/gophish;ReplacePathRegex: ^/gophish/(.*) /$$1”

I’ve also modify the traefik.toml file:

[entryPoints]
  [entryPoints.http]
  address = “:80”
    [entryPoints.http.redirect]
    entryPoint = “https”
    rule = “Path:/portainer,/files/api,/gophish”

[…]

[gophish]
  entryPoint = “gophish”

Do you have any idea of what might cause this error? Thank you for your time, Aurélien

0m3nsec commented 4 years ago

I ran into the same thing. For now I've just used port 3333 to access it. It has built in auth so it shouldn't be a big deal.