______________________________________________________________
| |
| Save your fingers - get your fake names from the i-net |#
| »»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»» |#
| |#
| by DiA/rrlf (c)2005 |#
| www.vx-dia.de.vu :: DiA_hates_machine@gmx.de |#
|______________________________________________________________|#
###############################################################
_Overview___________________________________
| |
| 1_Intro |#
| 2_How to do? |#
| 3_Gimme a code, please! |#
| 4_Outro |#
|____________________________________________|#
#############################################
.Disclaimer
»»»»»»»»»»
The author of this article is NOT responsible for possible damages in case
of informations you getting here. You do your own things with your own risk,
please don't do anything stupid for your own security. This document is for
educational purpose only. If you do NOT agree this, please close this for
your own pleasure!
.1_Intro
»»»»»»»
Maybe you know this situation, you write a pretty good massmailer, i-net or
P2P worm and you need some ideas for the fake names. You are sick seeing names
like "Damn_Fine_Porn.mpg .exe" or "Photoshop Crack working!.exe". So
what to do? Get some inspiration from the internet, go to some warez/crackz
sites and copy and paste some real crack names including application name,
exact version number and maybe the author of the crack. Looking a bit realer
then "Micr0soft all products keygen.exe", huh?!
You wanna do some good stuff, including many names... you are now copy and
paste your name number 34, stupid work, no? At this point I ask you, why do
you copy and paste a already existing huge database of names? Just write a
simple but effective code and get thousends of names at runtime :). So read on
and see how easy it is...
.2_How to do?
»»»»»»»»»»»»
OK, what we need for this tutorial is a internet connection. Without it will
not work of course. Now save this file - http://crack.ms/cracks/a_1.shtml -
local as - fakenames.txt -. Take a look, at the head of this file you see some
uninteressting stuff, like popup scripts, meta tags and links. But if you go to
the end of this file you see a huge list of the crack names. Thats what we want.
Let's pick out one link including the name that we want to extract:
ABCalculator 1.1.0 by DBC
And one more:
Aare CD Ripper v3.2 by HTBTeam
Fine, now when you have a look you will fast see that every name is between
(dword - 4 bytes) "ank>" and "". So we have to find "ank>" and we have the
start of the name. Byte by byte we search for the end "" and so we have
the length of the name. We know the start of the name and the length, sweet,
we can extract it ;). With this method we can do so name by name, until we are
at the end of the file.
Remember that this is only a example, there are more then 1.000.000 crackz/
warez/serialz sites on the internet, you only have to know how the structure
of the HTML files they use is.
Let's do a little to-do list for our example application:
1. Make a random valid URL (eg w_2.shtml)
2. Download this file
3. Open the file
4. Get the file size
5. If it's not big enough goto 1.
6. Free enough memory
7. Read whole content in memory
8. Close File
9. Find start of next fake name "ank>"
10. Find end of next fake name ""
11. Extract fake name
12. What you wanna do with this name (in example log in a .htm file)
13. If end of file goto 15.
14. Jump to 9.
15. Exit
If it sounds hard to do for you, then the only reason for this is my shitty
english ;D. Just take a look at the small code, and you will see that it is
pretty easy to do.
.3_Gimme a code, please!
»»»»»»»»»»»»»»»»»»»»»»»
;-----ExtractNames.asm-----cut-----start---------------------------------------------
include "%fasminc%\win32ax.inc" ;equates
ExtractNames:
call MakeURL ;make a random url (a-z,1-9)
invoke URLDownloadToFile,\ ;download it baby
0,\ ;no activeX required
FakeNamesURL,\ ;download this file
FakeNamesFile,\ ;save local to this file
0,\ ;reserved
0 ;no interface
cmp eax, 0 ;error if it is not null
jne ExtractNames ;then make new URL and download again
WaitForDownload:
invoke CreateFile,\ ;open downloaded file
FakeNamesFile,\ ;open this file (in current folder)
GENERIC_READ,\ ;only need read access
FILE_SHARE_READ,\ ;---""---
0,\ ;dont need security attributes
OPEN_EXISTING,\ ;we want to open the file
FILE_ATTRIBUTE_NORMAL,\ ;normal attributes
0 ;no template file
cmp eax, INVALID_HANDLE_VALUE ;if error then the download is not finished
je WaitForDownload ;try to open again
mov dword [FileHandle], eax ;save file handle
invoke GetFileSize,\ ;get file size of downloaded file
dword [FileHandle],\ ;via file handle
0 ;just get low size
mov dword [FileSize], eax ;save file size
cmp eax, 7000d ;if its <7000 bytes, then its the error page from crack.ms
ja GetMemory ;if not go to get memory
invoke CloseHandle,\ ;close handle
dword [FileHandle] ;to delete it
invoke DeleteFile,\ ;delete invalid fake names file
FakeNamesFile ;delete this
jmp ExtractNames ;repeat all
GetMemory:
invoke GlobalAlloc,\ ;get enough memory
GMEM_MOVEABLE,\ ;allocation attribute, moveable
dword [FileSize] ;that mich memory we need
mov dword [MemHandle], eax ;save handle
invoke GlobalLock,\ ;get memory start
dword [MemHandle] ;via handle
mov dword [MemStart], eax ;save start
invoke ReadFile,\ ;read whole content from file
dword [FileHandle],\ ;open file, handle
dword [MemStart],\ ;buffer start
dword [FileSize],\ ;read that much
BytesRW,\ ;bytes read
0 ;no overlapped structure
invoke CloseHandle,\ ;we can close the file
dword [FileHandle] ;via handle
;***only for this example***
invoke CreateFile,\ ;make the output file
OutputFile,\ ;file name
GENERIC_WRITE,\ ;with write access
FILE_SHARE_WRITE,\ ;---""---
0,\ ;no security
CREATE_ALWAYS,\ ;create it
FILE_ATTRIBUTE_NORMAL,\ ;normal attributes
0 ;no temp file
mov dword [FileHandle], eax ;save handle
;***only for this example***
mov ebx, dword [MemStart] ;get memory start in ebx
add ebx, 3667d ;go over the file header (scripts, meta, links...)
;(keep in mind that this is the structure
; of files on crack.ms, if you use another site
; the structure is different!)
push ebx ;save to stack
FindMoreNames:
pop ebx ;get file position from stack
xor ecx, ecx ;set name length counter to null
GetStartOfName:
cmp dword [ebx], "