home *** CD-ROM | disk | FTP | other *** search
- ;▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
- ;
- ; *** Award Modular BiOS crack tool ***
- ;
- ; (c) 1996 by The Immortal
- ;
- ; Have fun with this cool program!
- ;
- ; Have a look at the info-file so you
- ; know how to use this awesome cool &
- ; powerful program!!
- ;
- ; bye & have fun,
- ;
- ; The Immortal.
- ;
- ; P.S.: Assembler used: TASM 3.2
- ; PP.S.: contact me at 'The Source'!
- ;
- ;▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
-
- .MODEL TINY
- .CODE ;make it a com-file!
- ORG 100h
-
- ;▒▒▒ program start: ▒▒▒
- start:
-
- jmp real_start ;jump to real program start...
-
- ;▒▒▒ global data: ▒▒▒
- copyr db 13, "════════════════════════════════════════════════════════════════════════════", 13, 10
- db " *** Award Modular BiOS crack tool, (c) 1996 by The Immortal / AUSTRiA! ***", 13, 10
- db "════════════════════════════════════════════════════════════════════════════"
- db 13, 10, "$"
-
- pw_1 db 13, 10, "* Password needed to enter System!", 13, 10, "$"
- pw_2 db 13, 10, "* Password needed to enter Setup!", 13, 10, "$"
- pw_3 db 13, 10, "* Supervisor-password is disabled!", 13, 10, "$"
- pw_4 db 13, 10, "* Supervisor-password is enabled!", 13, 10, "$"
- pw_5 db 13, 10, "* User-password is disabled!", 13, 10, "$"
- pw_6 db 13, 10, "* User-password is enabled!", 13, 10, "$"
-
- ;format: length, "cmdl":
- ;-------------------------------
- p_show db 4, "SHOW" ;command-line parameters...
- p_soff db 8, "SUPEROFF"
- p_son db 7, "SUPERON"
- p_system db 6, "SYSTEM"
- p_setup db 5, "SETUP"
- p_uoff db 7, "USEROFF"
- p_uon db 6, "USERON"
-
- num_params EQU 7
-
- help db 13, 10, "Usage: AW-CRACK [SHOW | SUPERON|SUPEROFF | USERON|USEROFF | SYSTEM|SETUP]"
- db 13, 10
- db 13, 10, " SHOW ... displays password status, also if it's set to"
- db 13, 10, " system or setup level!"
- db 13, 10
- db 13, 10, " SUPERON|SUPEROFF,"
- db 13, 10, " USERON|USEROFF: ... enables or disables the bios-password!"
- db 13, 10, " WARNING!: never enable unknown password(s),"
- db 13, 10, " if you don't have a backdoor!"
- db 13, 10
- db 13, 10, " SYSTEM|SETUP ... sets password-check to system or setup level!"
- db 13, 10, 13, 10, "* Please note: only one single parameter is allowed at a run!"
- db 13, 10, "* This program won't work with other BIOS-types than Award _Modular_!"
- db 13, 10, "$"
-
- cmdl db 128 dup (?)
- db "$"
-
- ;▒▒▒ print_msg: ▒▒▒
- print_msg:
- mov ah, 09h ;DOS: print message
- int 21h
- ret
-
- ;▒▒▒ parse_cmdl: ▒▒▒
- ;
- ;return: AX: 0000h = SHOW
- ; 0001h = ON, 0002h = OFF
- ; 0003h = SYSTEM, 0004h = SETUP
- ; FFFFh = error... (unknown command-line parameter!)
- parse_cmdl:
-
- ;*** copy command-line first: ***
- mov si, 80h ;PSP: command-line
- lea di, cmdl
- lodsb
- xor cx, cx
- mov cl, al ;CX = length of cmdl
- lodsb
- rep movsb
-
- ;*** upcase command-line: ***
- lea di, cmdl
- lea si, cmdl
- mov cl, al ;CX = length of cmdl
- uploop:
- lodsb
- cmp al, 97 ;'a'
- jb upok
-
- cmp al, 122 ;'z'
- ja upok
-
- sub al, (97-65) ;upcase it!
- upok:
- stosb ;store char...
- loop uploop
-
- ;*** compare cmdl-parameters: ***
-
- lea si, p_show
-
- xor ax, ax ;return value!
-
- mov cx, num_params ;possible # of command-line params...
- comp_loop:
- push cx
- push ax
-
- lea di, cmdl
- lodsb
- xor cx, cx ;get length
- mov cl, al
- repe cmpsb
- mov bx, cx
-
- add si, cx ;add unused to offset
-
- pop ax ;get return-value
- pop cx
-
- or bx, bx ;parameter match...
- jz done
-
- inc ax
- loop comp_loop
-
- error:
- mov ax, 0ffffh ;error!
-
- done:
- ret ;back 2 caller!
-
- ;▒▒▒ read_CMOS: ▒▒▒
- read_CMOS:
- mov dx, 70h ;read CMOS position in AL
- out dx, al
- inc dx
- in al, dx
- ret ;return: AL
-
- ;▒▒▒ write_CMOS: ▒▒▒
- write_CMOS:
- mov dx, 70h ;write AH to CMOS position in AL
- out dx, al
- inc dx
- mov al, ah
- out dx, al
- ret
-
- ;▒▒▒ show_info: ▒▒▒
- show_info: ;*** Password at system/setup level? ***
-
- ;*** Supervisor-password disabled/enabled? ***
-
- mov al, 11h ;read CMOS-position 11h
- call read_CMOS
-
- lea dx, pw_3 ;supervisor-pwd disabled
-
- and al, 02h ;Password: disabled/enabled?
- jz pw_superdisabled
-
- lea dx, pw_4 ;supervisor-pwd enabled
- call print_msg
- jmp pw_level
-
- pw_superdisabled:
- call print_msg ;print message
-
- ;*** User-password disabled/enabled? ***
-
- mov al, 5eh ;read CMOS-position 5eh
- call read_CMOS
-
- lea dx, pw_5 ;user-pwd disabled
-
- and al, 01h ;Password: disabled/enabled?
- jz pw_userdisabled
-
- lea dx, pw_6 ;user-pwd enabled
- call print_msg
- jmp pw_level
-
- pw_userdisabled:
- call print_msg ;print message
- jmp show_done
-
- pw_level: ;▒▒▒ write out pwd-level ▒▒▒
-
- mov al, 11h ;read CMOS-position 11h
- call read_CMOS
-
- lea dx, pw_1 ;System level
-
- and al, 01h ;Password: System/Setup level
- jnz pw_system
-
- lea dx, pw_2 ;Setup level
-
- pw_system:
- call print_msg ;print message
-
- show_done:
-
- ret ;back 2 caller!
-
- ;▒▒▒ do_checksum: ▒▒▒
- do_checksum: ;calculate new CMOS checksum,
- ;and write it back to the CMOS...
-
- mov cx, 2dh - 10h + 1 ;CMOS-reg. 10h - 2dh (both incl.!)
- xor ah, ah
- xor bx, bx
-
- checksum_loop:
-
- mov dx, 70h
- mov al, 2dh + 1
- sub al, cl ;al = register in CMOS
- out dx, al
- inc dx
- in al, dx ;read CMOS-reg!
-
- add bx, ax ;add 2 checksum!
-
- loop checksum_loop
-
- mov dx, 70h ;write new checksum back to CMOS!
- mov al, 2eh
- out dx, al
- inc dx
- mov al, bh ;write high-byte!
- out dx, al
-
- mov dx, 70h ;write low-byte!
- mov al, 2fh
- out dx, al
- inc dx
- mov al, bl
- out dx, al ;done!
-
- ret ;return to caller!
-
- ;▒▒▒ do_checksum_ext: ▒▒▒
- do_checksum_ext: ;calculate new extended CMOS checksum,
- ;and write it back to the CMOS...
-
-
- mov cx, 79h - 42h + 1 ;42h - 79h (both incl.!)
- xor ah, ah
- xor bx, bx
-
- check_loop_ext:
-
- mov dx, 70h
- mov al, 79h + 1
- sub al, cl ;al = register in CMOS
- out dx, al
- inc dx
- in al, dx ;read reg
-
- add bx, ax ;add 2 checksum!
-
- loop check_loop_ext
-
- mov dx, 70h ;write new ext.-checksum back to CMOS!
- mov al, 7ah
- out dx, al
- inc dx
- mov al, bh ;write high-byte!
- out dx, al
-
- mov dx, 70h ;write low-byte!
- mov al, 7bh
- out dx, al
- inc dx
- mov al, bl
- out dx, al ;done!
-
- ret ;return 2 caller!
-
- ;▒▒▒ real_start: ▒▒▒
- real_start: ;program real-entry point!
-
- push cs ;DS = CS
- pop ds
- push cs ;ES = CS
- pop es
-
- ;*** print copyright ***
- lea dx, copyr
- call print_msg
-
- call parse_cmdl ;parse command-line...
-
- cmp ax, 0000h ;display pwd-info...
- je pwd_info
-
- cmp ax, 0002h ;enable supervisor-pwd...
- je pwd_superenable
-
- cmp ax, 0001h ;disable supervisor-pwd...
- je pwd_superdisable
-
- cmp ax, 0003h ;set pwd to system level
- je pwd_system
-
- cmp ax, 0004h ;set pwd to setup level
- je pwd_setup
-
- cmp ax, 0006h ;enable user-pwd...
- je pwd_userenable
-
- cmp ax, 0005h ;disable user-pwd...
- je pwd_userdisable
-
- jmp helpscreen
-
- ;*** display pwd-information ***
- pwd_info:
- call show_info ;show pwd-info...
- jmp back2dos
-
- ;*** set pwd to setup level ***
- pwd_setup:
- mov al, 11h ;read CMOS-reg. 11h
- call read_CMOS
- and al, NOT 1 ;set pwd to setup-level
- mov ah, al
- mov al, 11h
- call write_CMOS ;write CMOS-reg. 11h
-
- call do_checksum
-
- lea dx, pw_2 ;print info-messy
- call print_msg
- jmp back2dos
-
- ;*** set pwd to system level ***
- pwd_system:
- mov al, 11h ;read CMOS-reg 11h
- call read_CMOS
- or al, 1 ;set pwd to system level
- mov ah, al
- mov al, 11h
- call write_CMOS ;write CMOS-reg. 11h
-
- call do_checksum
-
- lea dx, pw_1 ;print info-messy
- call print_msg
- jmp back2dos
-
- ;*** enable bios supervisor-password ***
- pwd_superenable:
- mov al, 11h ;read CMOS-reg 11h
- call read_CMOS
- or al, 2 ;enable PWD-bit
- mov ah, al
- mov al, 11h ;write CMOS-reg 11h
- call write_CMOS
-
- call do_checksum ;calculate new CMOS checksum
-
- lea dx, pw_4 ;print info-messy
- call print_msg
- jmp back2dos
-
- ;*** disable bios supervisor-password ***
- pwd_superdisable:
- mov al, 11h ;read CMOS-reg 11h
- call read_CMOS
- and al, NOT 2 ;disable PWD-bit
- mov ah, al
- mov al, 11h ;write CMOS-reg 11h
- call write_CMOS
-
- call do_checksum ;calculate new CMOS checksum
-
- lea dx, pw_3 ;print info-messy
- call print_msg
- jmp back2dos
-
- ;*** dummy jump ***
- pwd_userdisable:
- jmp real_userdisable
-
- ;*** enable bios user-password ***
- pwd_userenable:
- mov al, 5eh ;read CMOS-reg 5eh
- call read_CMOS
- or al, 1 ;enable PWD-bit
- mov ah, al
- mov al, 5eh ;write CMOS-reg 5eh
- call write_CMOS
-
- call do_checksum_ext ;calculate new CMOS checksum
-
- lea dx, pw_6 ;print info-messy
- call print_msg
- jmp back2dos
-
- ;*** disable bios user-password ***
- real_userdisable:
- mov al, 5eh ;read CMOS-reg 5eh
- call read_CMOS
- and al, NOT 1 ;disable PWD-bit
- mov ah, al
- mov al, 5eh ;write CMOS-reg 5eh
- call write_CMOS
-
- call do_checksum_ext ;calculate new CMOS checksum
-
- lea dx, pw_5 ;print info-messy
- call print_msg
- jmp back2dos
-
- ;*** write helpscreen ***
- helpscreen:
- lea dx, help ;print helpscreen
- call print_msg
- ; jmp back2dos
-
- back2dos:
- .exit 0 ;back 2 dos
-
- END start
-