Skip to content

Ensure database audit code attempts to use passwordless options before sending credentials #3999

Closed

Description

@YongBoLiu

Describe the bug

A clear and concise description of what the bug is.

Falcon EDR detected: Do not transmit credentials in clear text over any network.

Others have the chance to get the password by: ps -ef, when run the cli/audit_database.php --load.

Steps to reproduce the behavior:

  1. Go to cacti/cli

  2. Check the code of audit_database.php.

exec('mysqldump -u' . $database_username . ' -p' . $database_password . ' ' . $database_default . ' table_columns table_indexes --extended-insert=FALSE > ' . $config['base_path'] . '/docs/audit_schema.sql');

To Reproduce

Expected behavior

A clear and concise description of what you expected to happen.

Screenshots

If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information)

  • OS: [e.g. iOS]
    Linux

  • Browser [e.g. chrome, safari]

  • Version [e.g. 22]

Smartphone (please complete the following information)

  • Device: [e.g. iPhone6]

  • OS: [e.g. iOS8.1]

  • Browser [e.g. stock browser, safari]

  • Version [e.g. 22]

Additional context

Add any other context about the problem here.
We can set the user and password in my.cnf or a file then use --defaults-extra-file option on mysqldump.
A simple way is try to mysqldump without user and password first, if failed then mysqldump with user and password. This can minimize the chance be caught by others. As it is a CLI, not called by web page, i think it's ok for security.

Activity

  1. added a commit that references this issue on Dec 10, 2020
    823300e
  2. added 2 commits that reference this issue on Dec 24, 2020
  3. added a commit that references this issue on Dec 30, 2020
    a3319e8
  4. added
    SECURITYA security issue reported through CVE
    and removed
    unverifiedSome days we don't have a clue
    SECURITYA security issue reported through CVE
    on Jan 1, 2021
  5. added this to the v1.2.17 milestone on Jan 1, 2021
  6. changed the title [-]The chances of mysqldump with password should be minimized[/-] [+]Ensure database audit code attempts to use passwordless options before sending credentials[/+] on Jan 4, 2021
  7. locked and limited conversation to collaborators on Apr 5, 2021
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

    bugUndesired behaviourresolvedA fixed issue

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions