mirror of
https://github.com/Pennyw0rth/NetExec
synced 2026-06-06 16:34:30 +00:00
66dbf87af5
Recap on changes: Complete refactor, script broken up to make it readable Kerberos support (!!!! sweeeeet !!!!) Logging has been overhauled (everything sent to stdout gets logged) Added a noOutput attr on all three excution methods Exposed a --no-output option for moar stealth when executing commands Exposed a --lsa option to dump LSA secrets Exposed the -history and -pwdLastSet options from secretdump Fixed passpoldumper Fixed the NTDS.dit dumper HTTP/HTTPS server now removes powershell script comments HTTP/HTTPS server randomizes powershell function names to bypass AV on windows 10 --session and --luser output has been made decent (resolves #42) Moar code style changes and bugfixes TODO: hook back up ninja and vss NTDS.dit dumping methods Allow all three execution methods to utilize the smbserver as fallback to retrieve command output expose some options to control remote services
48 lines
1.9 KiB
Python
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):
|
|
|
|
if settings.args.execm == '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 settings.args.execm == '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 settings.args.execm == '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) |