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

Custom PBA on Windows throws a UnicodeDecodeError #2215

Closed
shreyamalviya opened this issue Aug 25, 2022 · 1 comment
Closed

Custom PBA on Windows throws a UnicodeDecodeError #2215

shreyamalviya opened this issue Aug 25, 2022 · 1 comment
Labels
Bug An error, flaw, misbehavior or failure in the Monkey or Monkey Island. Complexity: Medium Impact: High

Comments

@shreyamalviya
Copy link
Contributor

Describe the bug

Running a custom PBA on Windows (haven't tried on Linux) throws the following error:

2022-08-25 13:43:12,020 [35320:PBAThread:ERROR] automated_master._run_plugins.237: Got unhandled exception when running post-breach action plugin PluginConfiguration(name='CustomPBA', options={'linux_command': '', 'linux_filename': '', 'windows_command': 'a.bat & del a.bat', 'windows_filename': 'a.bat'}). Plugin was passed to <bound method AutomatedMaster._run_pba of <infection_monkey.master.automated_master.AutomatedMaster object at 0x000002202E854348>>
Traceback (most recent call last):
  File "C:\Users\smalviya\Desktop\infection_monkey\monkey\infection_monkey\master\automated_master.py", line 234, in _run_plugins
    callback(p)
  File "C:\Users\smalviya\Desktop\infection_monkey\monkey\infection_monkey\master\automated_master.py", line 201, in _run_pba
    for pba_data in self._puppet.run_pba(pba.name, pba.options):
  File "C:\Users\smalviya\Desktop\infection_monkey\monkey\infection_monkey\puppet\puppet.py", line 41, in run_pba
    return pba.run(options)
  File "C:\Users\smalviya\Desktop\infection_monkey\monkey\infection_monkey\post_breach\custom_pba\custom_pba.py", line 37, in run
    return super().run(options)
  File "C:\Users\smalviya\Desktop\infection_monkey\monkey\infection_monkey\post_breach\pba.py", line 46, in run
    result = exec_funct()
  File "C:\Users\smalviya\Desktop\infection_monkey\monkey\infection_monkey\post_breach\custom_pba\custom_pba.py", line 66, in _execute_default
    return super(CustomPBA, self)._execute_default()
  File "C:\Users\smalviya\Desktop\infection_monkey\monkey\infection_monkey\post_breach\pba.py", line 83, in _execute_default
    self.command, stderr=subprocess.STDOUT, shell=True, timeout=self.timeout
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xfe in position 59: invalid start byte

To Reproduce

Steps to reproduce the behavior:

  1. Try running a custom PBA on Windows

Expected behavior

It should run with no errors.

Machine version (please complete the following information):

  • OS: Windows
@shreyamalviya shreyamalviya added Bug An error, flaw, misbehavior or failure in the Monkey or Monkey Island. Impact: High Complexity: Medium labels Aug 25, 2022
@cakekoa
Copy link
Contributor

cakekoa commented Oct 25, 2022

PBAs are being removed in #2442

@cakekoa cakekoa closed this as not planned Won't fix, can't repro, duplicate, stale Oct 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug An error, flaw, misbehavior or failure in the Monkey or Monkey Island. Complexity: Medium Impact: High
Projects
None yet
Development

No branches or pull requests

2 participants