Train

PDA

توجه ! این یک نسخه آرشیو شده میباشد و در این حالت شما عکسی را مشاهده نمیکنید برای مشاهده کامل متن و عکسها بر روی لینک مقابل کلیک کنید : Boot Sector Password Code


NI3
10-23-2003, 03:54 PM
nemidonam shoma ino didid ya nah
-----
Six step to protect u'r system
these step is used for system security. we r going to write on boot sector

Before u do this pls make sure that u have a bootable floppy with u do this on u'r own risk { if ( u do in proper way ) no need of floppy }


This process introduces a simple pass-key security.Many boot sector have some space unused and then additions require only 16 bytes, so the small program can be inccorporate into existing boot sector.


1.
========
Determine whether there is suffcient room :


c:\> debug

-l 0 2 0 1
-d 180
will load the boot record and display the final 80 (hex) bytes


2.
========
The first instruction in the first byte of the boot record must be changed to jump to the pass-key code

-a 0
xxxx:0000 jmp 1ee <cr>
xxxx:0003 <cr>

Remember the destination of the original jmp instruction ( often jmp 36 ) the pass-key code will jump to the same address after the right key is pressed.

3.
========
you must locate an error routine to use if the wrong key is pressed.

Display the sector and find the string address of an error message

Search for mov si,7xxx
-u

Where 7c00+offset of the error message = 7xxx, followed by a jmp or call to a portion of code such as

lodsb
or al,al
jn nnnn ; ret instruction or continuation of error handler
mov bx,7
mov ah,0e
int 10
jmp kkkk ; jmp back to lodsb instuction

This code writes an error message ro the display . the pass-key code will branch
to an existing error message if an incorrect key is pressed. remember the address
of the mov si,7xxx instruction, for use as your error routine.


4.
========
Determine which key to use as the pass-key that permits the system to boot find the scan code returned in register ax for the key. ESC returns 011bh


5.
========
Enter code in debug command , changing the address and scan code as appropriate.


-a 1ee

xxxx:01ee xor ax,ax
xxxx:01f0 int 16
xxxx:01f2 cmp ax,011b ; substitute scan code here
xxxx:01f5 jz 1fa ; short conditional jump if ok
xxxx:01f7 jmp 0c2 ; substitute error routine address
xxxx:01fa jmp 036 ; substitute initial jump destination
xxxx:01fd <cr>

6.
========
the address must be adjusted to the particular disk and boot record used.

After the above changes have been assembled into boot record, write the record back to the disk

-w 0 2 0 1 <cr>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~``

You can do this also.... if (not right key pressed) reboot

xor ax,ax
int 16
cmp ax,011b
jz ffff:0000 ;reboot the system
imp xxxx:00000 ;original boot sector address