Files
Pennyw0rth-NetExec/core/executor.py
T
byt3bl33d3r c9bb82fb45 Initial PowerView integration, for some reason only works when using
smbexec as the execution method, so for now it's forced to that
Fixed a bug where forcing Powershell code to run in a 32bit process
would cause a rpc_access_denied error message
Made Mimikatz parser output more consistent
Made wmiexec and smbexec output more consistent
2015-11-19 18:13:32 -07:00

48 lines
1.9 KiB
Python

from scripts.wmiexec import WMIEXEC
from scripts.smbexec import SMBEXEC
from scripts.atexec import TSCH_EXEC
import settings
class EXECUTOR:
"""Yes, I know this sounds like the pokemon... deal with it"""
def __init__(self, command, host, domain, noOutput, smbconnection, method):
if method == 'wmi':
wmi_exec = WMIEXEC(command,
settings.args.user,
settings.args.passwd,
domain,
settings.args.hash,
settings.args.aesKey,
settings.args.share,
noOutput,
settings.args.kerb)
wmi_exec.run(host, smbconnection)
elif method == 'smbexec':
smb_exec = SMBEXEC(command,
'{}/SMB'.format(settings.args.port),
settings.args.user,
settings.args.passwd,
domain,
settings.args.hash,
settings.args.aesKey,
settings.args.kerb,
'SHARE',
settings.args.share,
noOutput)
smb_exec.run(host)
elif method == 'atexec':
atsvc_exec = TSCH_EXEC(command,
settings.args.user,
settings.args.passwd,
domain,
settings.args.hash,
settings.args.aesKey,
settings.args.kerb,
noOutput)
atsvc_exec.play(host)