Skip to content

[Bug] Duplicate File Logs for Emulations #73

Description

@terrancedejesus

🐛 Bug Report

Describe the bug

When running an emulation, there is a separate console and file handler set to self.elogger within BaseEmulation. This allows emulations to use a secondary logger to separate logging. The log files written to are within the logs/ directory where the log file name represents the emulation.

There is a bug currently that is duplicating logs within each respective emulation log file.

Steps to reproduce

Steps to reproduce the behavior:

  1. Start SWAT Shell
  2. Authenticate with OAuth credentials
  3. Run any OOTB emulation
  4. Review log file in logs/

Expected behavior

The logging should only be happening once per self.elogger.* call.

Screenshots

2023-08-12 15:15:32,486 - initial_access.gmail_phishing_form_link - INFO - Created Google Form: 17b0DwhmBY0Ihv_q85zuZj2fJdPYOFQuiuhuZvbGSgAg (gmail_phishing_form_link.py:47)
2023-08-12 15:15:32,486 - initial_access.gmail_phishing_form_link - INFO - Created Google Form: 17b0DwhmBY0Ihv_q85zuZj2fJdPYOFQuiuhuZvbGSgAg (gmail_phishing_form_link.py:47)
2023-08-12 15:15:32,488 - initial_access.gmail_phishing_form_link - INFO - Created email with Google Form link (gmail_phishing_form_link.py:59)
2023-08-12 15:15:32,488 - initial_access.gmail_phishing_form_link - INFO - Created email with Google Form link (gmail_phishing_form_link.py:59)
2023-08-12 15:15:33,333 - initial_access.gmail_phishing_form_link - INFO - Sent email to terrance@dejesusarcheology.com from rekcahatonton@gmail.com (gmail_phishing_form_link.py:65)
2023-08-12 15:15:33,333 - initial_access.gmail_phishing_form_link - INFO - Sent email to terrance@dejesusarcheology.com from rekcahatonton@gmail.com (gmail_phishing_form_link.py:65)

SWAT version

0.0.1

Checklist

Please ensure you've completed the following tasks:

  • I've described the bug in as much detail as possible
  • I've provided steps to reproduce the bug
  • I've added any relevant screenshots or other information

Activity

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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions