GhostManager / Ghostwriter

The SpecterOps project management and reporting engine

Home Page:https://ghostwriter.wiki

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

2FA Does not seem to work

SecretSantaa opened this issue · comments

2FA Not Working as Expected
I am trying to configure 2FA as seen in the admin dashboard. However, I have tried scanning the QR Code with YubiKey Authenticator, Google Authenticator, and other applications that manage time based access codes. When I input all of these codes I get "The entered token is not valid". Since there is a space in the placeholder (i.e., "045 318") I have also tried using a space in these values as well.
image

Is this something that other people are seeing? I'm scanning the QR code, and inputting the 6 digit code as the input for "Input a token generated by the app:".

Server Specs:
OS: RHEL 7.1
Docker: 25.0.4, build 1a576v5
Docker Compose: v2.24.7
Ghostwriter v4.0.8

Hey @SecretSantaa, the cause if this is likely the clock. Your code is valid, but either from the past or the future because your device's clock is in sync with the server clock. Docker is supposed to use the host's system clock. A couple of people have encountered an issue with codes being invalid during setup or at some later time. They found their system clocks had drifted +/- 2 or 3 minutes and re-syncing their system clocks resolved it.

Like 2FA on most platforms, the authentication process allows for some drift between the device time and system time. If you're a few seconds early or late, the code is still accepted, but once you're over ~30s early/late the code is no longer accepted.

That was it, the clocks were off by one minute. Thanks a bunch!