Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed problem with Procmon module not working #389

Merged
merged 2 commits into from
Nov 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions analyzer/windows/modules/auxiliary/procmon.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
from threading import Thread

from lib.common.abstracts import Auxiliary
from lib.common.constants import ROOT
from lib.common.exceptions import CuckooPackageError
from lib.common.results import upload_to_host

Expand All @@ -24,10 +23,10 @@ def __init__(self, options, config):
self.startupinfo = subprocess.STARTUPINFO()
self.startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW

bin_path = os.path.join(ROOT, "bin")
bin_path = os.path.join(os.getcwd(), "bin")
self.procmon_exe = os.path.join(bin_path, "procmon.exe")
self.procmon_pmc = os.path.join(bin_path, "procmon.pmc")
self.procmon_pml = os.path.join(bin_path, "procmon")
self.procmon_pml = os.path.join(bin_path, "procmon.PML")
self.procmon_xml = os.path.join(bin_path, "procmon.xml")

def run(self) -> bool:
Expand Down Expand Up @@ -75,7 +74,7 @@ def stop(self) -> bool:
(
self.procmon_exe,
"/OpenLog",
f"{self.procmon_pml}.PML",
self.procmon_pml,
"/LoadConfig",
self.procmon_pmc,
"/SaveAs",
Expand All @@ -87,7 +86,7 @@ def stop(self) -> bool:
)

# Upload the XML file to the host.
upload_to_host(self.procmon_xml, "procmon.xml")
upload_to_host(self.procmon_xml, "aux/procmon.xml")
return True
except Exception as e:
logging.error(e, exc_info=True)
Expand Down