Skip to content

Leaking OTP in Hadoop plugin  #3296

Closed

Description

@ilija-lazoroski

Describe the bug

It seems that we are leaking OTP in Hadoop payload logging

To Reproduce

Steps to reproduce the behavior:

  1. Configure the Monkey with Hadoop plugin
  2. Run the monkey on any hadoop machine
  3. Observe logs

Expected behavior

We shouldn't be logging OTP.

Screenshots

image

Machine version (please complete the following information):

  • OS: Windows or Linux

Tasks

  • Fix up logging level in Hadoop plugin
    • Do not forget to rebuild the plugin
  • Fix the regex in OTPFormatter
    • Store the OTP character set in common and use it in OTPFormatter and AuthenticationFacade.generate_otp()
    • Compile regexes as class variables so they don't need to be recompiled for every single log message

Activity

  1. added this to the v2.2.0 milestone on May 3, 2023
  2. shreyamalviya commented on May 3, 2023

    @shreyamalviya
    Contributor

    The regex in OTPFormatter needs to be fixed.

  3. mssalvatore commented on May 3, 2023

    @mssalvatore
    Collaborator

    We should also consider modifying the plugin to not leak this in the first place.

  4. mssalvatore commented on May 3, 2023

    @mssalvatore
    Collaborator

    The regex in OTPFormatter needs to be fixed.

    A few improvements that can be made:

    1. Store the OTP character set somewhere in common so the regex and the generate_otp() function are kept in sync
    2. Compile the regexes once as a class variables, instead of every time the format() function is called.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions