好友
阅读权限10
听众
最后登录1970-1-1
|
CM是什么?Crackme是什么?这是什么东西?楼主发的什么?
他们都是一些公开给别人尝试破解的小程序,制作 Crackme 的人可能是程序员,想测试一下自己的软件保护技术,也可能是一位 Cracker,想挑战一下其它 Cracker 的破解实力,也可能是一些正在学习破解的人,自己编一些小程序给自己破解,KeyGenMe是要求别人做出它的 keygen (序号产生器), ReverseMe 要求别人把它的算法做出逆向分析, UnpackMe 是要求别人把它成功脱壳,本版块禁止回复非技术无关水贴。
本帖最后由 dianziguan 于 2013-7-18 21:19 编辑
用seh来修改eip
程序很简单,代码很少,破解时请不要用修改字符串的方式,这样不好玩。
完整源代码如下:
.386
.model flat,stdcall
option casemap:none
include \masm32\include\windows.inc
include \masm32\include\user32.inc
include \masm32\include\kernel32.inc
include \masm32\include\advapi32.inc
includelib \masm32\lib\advapi32.lib
includelib \masm32\lib\user32.lib
includelib \masm32\lib\kernel32.lib
includelib \MASM32\LIB\oleaut32.lib
include \MASM32\include\oleaut32.inc
DlgProc PROTO :DWORD,:DWORD,:DWORD,:DWORD
.data
DlgName db "MyDialog",0
;AppName db "注册程序,(C)电子管 2012.07.15",0
SerialNumber1 db "12345678",0
regNumber1 dd 0,0
mesbok_1 db "哈哈哈哈",0
.data?
hInstance HINSTANCE ?
CommandLine LPSTR ?
regbuffer1 db 512 dup(?)
err1 dd ?
ok1 dd ?
.const
IDC_EDIT2 equ 3800
IDC_EDIT3 equ 3801
IDC_BUTTON equ 3001
IDC_EXIT equ 3002
.code
_ErrHandler proc C _lpExceptionRecord, _lpSEH, \
_lpContext, _lpDispatchContext
local @szBuffer[256]:byte
pushad
mov esi, _lpExceptionRecord
mov edi, _lpContext
assume esi:ptr EXCEPTION_RECORD, edi:ptr CONTEXT
lea ebx,mesbok_1
mov eax,0e1b2a2d7h;注册
mov [ebx],eax
mov eax,0a6b9c9b3h;成功
mov [ebx+4],eax
mov eax,ok1
mov [edi].regEip, eax
assume esi:nothing, edi:nothing
popad
mov eax, ExceptionContinueExecution
ret
_ErrHandler endp
start:
invoke GetModuleHandle, NULL
mov hInstance,eax
invoke DialogBoxParam, hInstance, ADDR DlgName,NULL,addr DlgProc,NULL
invoke ExitProcess,eax
DlgProc proc hWnd:HWND, uMsg:UINT, wParam:WPARAM, lParam:LPARAM
.IF uMsg==WM_INITDIALOG
invoke SetDlgItemText,hWnd,IDC_EDIT2,ADDR SerialNumber1
.ELSEIF uMsg== WM_CLOSE
invoke EndDialog, hWnd,NULL
.ELSEIF uMsg==WM_COMMAND
mov edx,wParam
mov eax,edx
shr edx,16
.if dx==BN_CLICKED
.IF ax==IDC_BUTTON
assume fs:nothing
push offset _ErrHandler
push fs:[0]
mov fs:[0], esp
mov eax,offset _SafePlace
mov ok1,eax
invoke GetDlgItemText,hWnd,IDC_EDIT3,ADDR regbuffer1,512
push esi
mov esi,offset regbuffer1
cld
lodsd
sub eax,30303030h
push eax
pop edx
lodsd
sub eax,30303030h
add eax,edx
sub eax,08080808h
mov edx,0
cld
mov cx,ax
div cx
mov edi,offset mesbok_1
mov eax,0e1b2a2d7h;注册
stosd
mov eax,0dcb0a7cah; 失败
stosd
_SafePlace:
invoke MessageBox, NULL, addr mesbok_1, addr mesbok_1, MB_OK
pop fs:[0]
pop eax
exit_1: invoke EndDialog, hWnd,NULL
invoke ExitProcess,eax
.ELSEIF ax==IDC_EXIT
invoke EndDialog, hWnd,NULL
.ENDIF
.ENDIF
.ELSE
mov eax,FALSE
ret
.ENDIF
mov eax,TRUE
ret
DlgProc endp
end start
|
免费评分
-
查看全部评分
|