Skip to content

Allow users to provide their own signed certificates #1145

Description

@mssalvatore

The Monkey Island provides a self-signed SSL certificate. This is nice because it helps get users up and running quickly. Unfortunately, this may not provide a sufficiently secure environment for enterprises.

Add a mechanism that allows a user to add their own certificate for Monkey Island. #1146, #1147, and #1148 are loose prerequisites for this issue.

  • Add a public and private key certificate field to the server_config.json that allows a user to specify a SSL cert for Monkey Island to use. (0d) - @shreyamalviya
    • If the specified SSL certificate exists with sufficiently secure permissions, use it.
    • If the specified SSL certificate exists with insecure permissions, provide the user with a error and fail.
    • If the specified SSL certificate does not exist, provide the user with an error and fail
    • If no SSL cert is specified, fall back on the default cert provided with the island.
    • Log a message stating which cert is being used and why.
  • Appimage: Update the documentation with instructions on how users can configure monkey to use a user-provided certificate. (0d) @mssalvatore
    • Run first with --setup-only
    • Modify server_config.json
    • Run regularly
  • Modify the docker build so that the docker's data_dir can be a volume whose contents are accessible to the user. (0d) @mssalvatore
    diff --git a/InfectionMonkey/Docker/Dockerfile b/InfectionMonkey/Docker/Dockerfile
    index 0c06b52e..a6e5db9d 100644
    --- a/InfectionMonkey/Docker/Dockerfile
    +++ b/InfectionMonkey/Docker/Dockerfile
    @@ -22,7 +22,6 @@ RUN groupadd -r monkey-island && useradd --no-log-init -r -g monkey-island monkey
     RUN chown monkey-island:monkey-island /monkey/monkey_island/cc/server.key && chmod 400 /monkey/monkey_island/cc/server.key
     RUN chown monkey-island:monkey-island /monkey/monkey_island/cc/server.csr && chmod 400 /monkey/monkey_island/cc/server.csr
    RUN chown monkey-island:monkey-island /monkey/monkey_island/cc/server.crt && chmod 400 /monkey/monkey_island/cc/server.crt
    - COPY ./monkey/monkey_island/cc/server_config.json /monkey_island_data/
    RUN chmod 700 /monkey_island_data && chown -R monkey-island:monkey-island /monkey_island_data
    USER monkey-island
    CMD ["bash","-c","source bin/activate && python ./monkey_island.py --server-config /monkey_island_data/server_config.json"]
  • Docker: Update the documentation with instructions on how users can configure monkey to use a user-provided certificate. (0d) @mssalvatore
    • docker run command that starts monkey will need to use a volume so that it is persistent and users can modify it
    • docker run with --setup-only
    • Modify server_config
    • Run regularly
  • Debug docker issue: PR_END_OF_FILE_ERROR when using signed certs (0d) @mssalvatore
  • MSI: Update the documentation with instructions on how users can configure monkey to use a user-provided certificate. (0d) @mssalvatore
    • Go to %AppData%\monkey_island and modify setup_config.json

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions