alxchk / pupy

OpenSource cross-platform python security toolkit (remote shell)
Other
45 stars 13 forks source link

Persistence broken #5

Closed Strazzom closed 6 years ago

Strazzom commented 6 years ago

Persistence is broken on Windows 7 x86, (I have not tested other versions of Windows).

Here is the output from attempting to run the persistence module from an admin process:

>> persistence -e '/opt/pupy/pupy.exe' -m wmi
ERROR:root:global name 'expandvars' is not defined
Traceback (most recent call last):
  File "/opt/pupy/pupylib/PupyJob.py", line 165, in module_worker
    module.run(self.args)
  File "/opt/pupy/modules/persistence.py", line 62, in run
    self.windows(args)
  File "/opt/pupy/modules/persistence.py", line 167, in windows
    remotefile = expandvars(
NameError: global name 'expandvars' is not defined
[-] global name 'expandvars' is not defined
Strazzom commented 6 years ago

Nevermind, fixed it.

There is a type in the variable expandvars in modules/persistence.py, line 165.

I would create a pull request, but it won't let me create one for this branch, (it redirects me to the ninjasec branch). You will have to fix it manually.

We need to resolve the maintainer issue. This is irritating.

EDIT: I see you have fixed it. Besides the typo, persistence seems to be working well, (registry method, connect payload).

alxchk commented 6 years ago

I already have push rights to upstream project. I hope to have some time this weekend to push/merge some pull requests including mine there. So likely all the things will be in upstream project