Skip to content

502 connecting Ghostwriter to Mythic #22

@maxyass

Description

@maxyass

I am getting a 502 when trying to tie together my mythic instance with Ghostwrite.
What I have done is this (all on the same ubuntu server):

  • installed Mythic
  • installed Ghostwriter
  • installed the ghostwriter mythic agent
  • installed mythic_sync

Below is an example of the logs on the mythic_sync container:
INFO 2025-10-20 19:56:28,978 Successfully authenticated to Mythic
INFO 2025-10-20 19:56:28,987 Backing off _execute_once(...) for 0.0s (gql.transport.exceptions.TransportServerError: 502, message='Bad Gateway', url=URL('https://192.168.1.15/v1/graphql'))
INFO 2025-10-20 19:56:29,004 Backing off _execute_once(...) for 2.0s (gql.transport.exceptions.TransportServerError: 502, message='Bad Gateway', url=URL('https://192.168.1.15/v1/graphql'))
INFO 2025-10-20 19:56:30,998 Backing off _execute_once(...) for 0.1s (gql.transport.exceptions.TransportServerError: 502, message='Bad Gateway', url=URL('https://192.168.1.15/v1/graphql'))
INFO 2025-10-20 19:56:31,118 Backing off _execute_once(...) for 1.5s (gql.transport.exceptions.TransportServerError: 502, message='Bad Gateway', url=URL('https://192.168.1.15/v1/graphql'))
ERROR 2025-10-20 19:56:32,610 Giving up _execute_once(...) after 5 tries (gql.transport.exceptions.TransportServerError: 502, message='Bad Gateway', url=URL('https://192.168.1.15/v1/graphql'))
ERROR 2025-10-20 19:56:32,611 Exception occurred while trying to post the query to Ghostwriter! Trying again in 5 seconds...
INFO 2025-10-20 19:56:32,611 Submitting an error notification to Mythic's notification center: MythicSync:
Exception occurred while trying to post the query to Ghostwriter!
502, message='Bad Gateway', url=URL('https://192.168.1.15/v1/graphql')
INFO 2025-10-20 19:56:37,634 Backing off _execute_once(...) for 1.0s (gql.transport.exceptions.TransportServerError: 502, message='Bad Gateway', url=URL('https://192.168.1.15/v1/graphql'))

within my mythic .env I have the Ghostwriter URL set as "https://192.168.1.15".

On a separate note; I am looking to develop a script to deploy Mythic and Ghostwriter and integrate them together automatically. Is there a way to generate a Ghostwriter API key via the ghostwriter cli?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions