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:
Start SWAT Shell
Authenticate with OAuth credentials
Run any OOTB emulation
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:
[x] I've described the bug in as much detail as possible
[x] I've provided steps to reproduce the bug
[x] I've added any relevant screenshots or other information
🐛 Bug Report
Describe the bug
When running an emulation, there is a separate console and file handler set to
self.elogger
withinBaseEmulation
. This allows emulations to use a secondary logger to separate logging. The log files written to are within thelogs/
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:
logs/
Expected behavior
The logging should only be happening once per
self.elogger.*
call.Screenshots
SWAT version
0.0.1
Checklist
Please ensure you've completed the following tasks: