8000 Windows package gathering fails · Issue #1389 · guardicore/monkey · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Windows package gathering fails #1389
Closed
@VakarisZ

Description

@VakarisZ

Describe the bug

Windows package gathering fails on unpriviledged monkey:

2021-07-30 16:41:52,627 [39232:30808:INFO] windows_info_collector.get_installed_packages.51: Getting installed packages
2021-07-30 16:41:55,897 [39232:30808:ERROR] monkey.collect_system_info_if_configured.288: Exception encountered during system info collection: Command '['dism', '/online', '/get-packages']' returned non-zero exit status 740.
Traceback (most recent call last):
  File "C:\Users\Vakaris\Desktop\infection_monkey\monkey\infection_monkey\monkey.py", line 285, in collect_system_info_if_configured
    system_info = system_info_collector.get_info()
  File "C:\Users\Vakaris\Desktop\infection_monkey\monkey\infection_monkey\system_info\__init__.py", line 46, in get_info
    return self.collector.get_info()
  File "C:\Users\Vakaris\Desktop\infection_monkey\monkey\infection_monkey\system_info\windows_info_collector.py", line 42, in get_info
    self.get_installed_packages()
  File "C:\Users\Vakaris\Desktop\infection_monkey\monkey\infection_monkey\system_info\windows_info_collector.py", line 53, in get_installed_packages
    packages = subprocess.check_output(shlex.split("dism /online /get-packages"))
  File "C:\Users\Vakaris\AppData\Local\Programs\Python\Python37\lib\subprocess.py", line 411, in check_output
    **kwargs).stdout
  File "C:\Users\Vakaris\AppData\Local\Programs\Python\Python37\lib\subprocess.py", line 512, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['dism', '/online', '/get-packages']' returned non-zero exit status 740.

This results in system_info telemetry not being sent.

To Reproduce

Steps to reproduce the behavior:

  1. Configure the Monkey to run system info collection
  2. Run monkey as unpriviledged user
  3. See error

Expected behavior

System info collection should expect monkey not always running as a privileged user. The package collection shouldn't kill system info collection, because that info is not even used in the reporting.

Screenshots

If applicable, add screenshots to help explain your problem.

Machine version (please complete the following information):

  • OS: Windows

Tasks

  • Remove functions (get_installed_packages() and get_wmi_info()) and run tests. (0.25d)

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugAn error, flaw, misbehavior or failure in the Monkey or Monkey Island.Complexity: LowImpact: Highsp/2

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue action 2BF9 s

      0