能力值:
( LV2,RANK:10 )
6 楼
6A362F29 > 55 push ebp
6A362F2A 8BEC mov ebp, esp
6A362F2C 83EC 4C sub esp, 4C
6A362F2F 8B4D 14 mov ecx, dword ptr [ebp+14]
6A362F32 53 push ebx
6A362F33 56 push esi
6A362F34 57 push edi
6A362F35 66:8339 0A cmp word ptr [ecx], 0A
没什么用,是在msvbvm60的领空。Alt+F9,点确定,来到了dump_的领空。
014D03BE . FF15 BC104000 call dword ptr [<&msvbvm60.rtcMsgBox>>; msvbvm60.rtcMsgBox
014D03C4 . 8D95 50FCFFFF lea edx, dword ptr [ebp-3B0]
014D03CA . 8D85 60FCFFFF lea eax, dword ptr [ebp-3A0]
014D03D0 . 52 push edx
014D03D1 . 8D8D 70FCFFFF lea ecx, dword ptr [ebp-390]
014D03D7 . 50 push eax
没什么用,是在msvbvm60的领空。Alt+F9,点确定,来到了dump_的领空。(在这里按ATL+F9 会执行下一步呀!而没有跳到DUMP_的领空呀!???????????)
能力值:
( LV2,RANK:10 )
20 楼
做了一点小试验
点“软件注册”后
DesDe("C2567E70BC78013D","88372239")
DesDe("66AF87788D21A01C","88372239")
DesDe("C2567E70BC78013D","88372239")
DesDe("66AF87788D21A01C","88372239")
以上产生了注册机器码,打开了注册窗口
输入一个注册号,如:13579135791357910246802468024680
点确认注册后:
DesEn("jkweflskj3439asdkmfe39asdk3","Jrji48HJFwer428KdEJ9")
做一次md5
DesEn("37159371","Jrji48HJFwer428KdEJ9")
做一次md5
DesDe("704CC669E51B1C6BC4B0D47887855A00D8B38190B1A362AA0C2DCBA384ECF7021EF361B62DF16FEAED6F7C073B87D46FA3D27D8422F25BC6","Jrji48HJFwer428KdEJ9")
之后就是注册失败了
能力值:
( LV2,RANK:10 )
21 楼
014BCF56 . FF15 A8104000 call dword ptr [<&msvbvm60.__vbaVarFo>; msvbvm60.__vbaVarForInit
014BCF5C . 8B3D 00114000 mov edi, dword ptr [<&msvbvm60.rtcMi>; msvbvm60.rtcMidCharVar
014BCF62 . 8B1D 48124000 mov ebx, dword ptr [<&msvbvm60.__vba>; msvbvm60.__vbaI4Var
014BCF68 > 85C0 test eax, eax
014BCF6A . 0F84 DD000000 je 014BD04D
014BCF70 . 8D85 58FFFFFF lea eax, dword ptr [ebp-A8]
014BCF76 . 8D4D DC lea ecx, dword ptr [ebp-24]
014BCF79 . 50 push eax
014BCF7A . 51 push ecx
014BCF7B . C785 60FFFFFF>mov dword ptr [ebp-A0], 1
014BCF85 . C785 58FFFFFF>mov dword ptr [ebp-A8], 2
014BCF8F . FFD3 call ebx
014BCF91 . 50 push eax
014BCF92 . 8D55 BC lea edx, dword ptr [ebp-44]
014BCF95 . 8D85 48FFFFFF lea eax, dword ptr [ebp-B8]
014BCF9B . 52 push edx
014BCF9C . 50 push eax
014BCF9D . FFD7 call edi
014BCF9F . 8D8D 28FFFFFF lea ecx, dword ptr [ebp-D8]
014BCFA5 . 8D55 DC lea edx, dword ptr [ebp-24]
014BCFA8 . 51 push ecx
014BCFA9 . 52 push edx
014BCFAA . C785 30FFFFFF>mov dword ptr [ebp-D0], 1
014BCFB4 . C785 28FFFFFF>mov dword ptr [ebp-D8], 2
014BCFBE . FFD3 call ebx
014BCFC0 . 50 push eax
014BCFC1 . 8D45 AC lea eax, dword ptr [ebp-54]
014BCFC4 . 8D8D 18FFFFFF lea ecx, dword ptr [ebp-E8]
014BCFCA . 50 push eax
014BCFCB . 51 push ecx
014BCFCC . FFD7 call edi
014BCFCE . 8D55 9C lea edx, dword ptr [ebp-64]
014BCFD1 . 8D85 48FFFFFF lea eax, dword ptr [ebp-B8]
014BCFD7 . 52 push edx
014BCFD8 . 8D8D 38FFFFFF lea ecx, dword ptr [ebp-C8]
014BCFDE . 50 push eax
014BCFDF . 51 push ecx
014BCFE0 . FF15 54124000 call dword ptr [<&msvbvm60.__vbaVarAd>; msvbvm60.__vbaVarAdd
014BCFE6 . 50 push eax
014BCFE7 . 8D95 18FFFFFF lea edx, dword ptr [ebp-E8]
014BCFED . 8D85 08FFFFFF lea eax, dword ptr [ebp-F8]
014BCFF3 . 52 push edx
014BCFF4 . 50 push eax
014BCFF5 . FF15 54124000 call dword ptr [<&msvbvm60.__vbaVarAd>; msvbvm60.__vbaVarAdd
014BCFFB . 8BD0 mov edx, eax
014BCFFD . 8D4D 9C lea ecx, dword ptr [ebp-64]
014BD000 . FFD6 call esi
014BD002 . 8D8D 18FFFFFF lea ecx, dword ptr [ebp-E8]
014BD008 . 8D95 38FFFFFF lea edx, dword ptr [ebp-C8]
014BD00E . 51 push ecx
014BD00F . 8D85 28FFFFFF lea eax, dword ptr [ebp-D8]
014BD015 . 52 push edx
014BD016 . 8D8D 48FFFFFF lea ecx, dword ptr [ebp-B8]
014BD01C . 50 push eax
014BD01D . 8D95 58FFFFFF lea edx, dword ptr [ebp-A8]
014BD023 . 51 push ecx
014BD024 . 52 push edx
014BD025 . 6A 05 push 5
014BD027 . FF15 38104000 call dword ptr [<&msvbvm60.__vbaFreeV>; msvbvm60.__vbaFreeVarList
014BD02D . 83C4 18 add esp, 18
014BD030 . 8D85 B8FEFFFF lea eax, dword ptr [ebp-148]
014BD036 . 8D8D C8FEFFFF lea ecx, dword ptr [ebp-138]
014BD03C . 8D55 DC lea edx, dword ptr [ebp-24]
014BD03F . 50 push eax
014BD040 . 51 push ecx
014BD041 . 52 push edx
014BD042 . FF15 C4124000 call dword ptr [<&msvbvm60.__vbaVarFo>; msvbvm60.__vbaVarForNext
014BD048 .^ E9 1BFFFFFF jmp 014BCF68
014BD0A6 . FF15 A8104000 call dword ptr [<&msvbvm60.__vbaVarFo>; msvbvm60.__vbaVarForInit
014BD0AC > 85C0 test eax, eax
014BD0AE . 0F84 D0010000 je 014BD284
014BD0B4 . 8D85 58FFFFFF lea eax, dword ptr [ebp-A8]
014BD0BA . 8D4D CC lea ecx, dword ptr [ebp-34]
014BD0BD . 50 push eax
014BD0BE . 51 push ecx
014BD0BF . C785 60FFFFFF>mov dword ptr [ebp-A0], 1
014BD0C9 . C785 58FFFFFF>mov dword ptr [ebp-A8], 2
014BD0D3 . FFD3 call ebx
014BD0D5 . 50 push eax
014BD0D6 . 8D55 9C lea edx, dword ptr [ebp-64] ; 上一个循环的结果
014BD0D9 . 8D85 48FFFFFF lea eax, dword ptr [ebp-B8]
014BD0DF . 52 push edx
014BD0E0 . 50 push eax
014BD0E1 . FFD7 call edi
014BD0E3 . 8D95 48FFFFFF lea edx, dword ptr [ebp-B8]
014BD0E9 . 8D8D 6CFFFFFF lea ecx, dword ptr [ebp-94]
014BD0EF . FFD6 call esi
014BD0F1 . 8D8D 58FFFFFF lea ecx, dword ptr [ebp-A8]
014BD0F7 . FF15 24104000 call dword ptr [<&msvbvm60.__vbaFreeV>; msvbvm60.__vbaFreeVar
014BD0FD . 8D8D 58FFFFFF lea ecx, dword ptr [ebp-A8]
014BD103 . 8D55 CC lea edx, dword ptr [ebp-34]
014BD106 . 51 push ecx
014BD107 . 52 push edx
014BD108 . C785 60FFFFFF>mov dword ptr [ebp-A0], 1
014BD112 . C785 58FFFFFF>mov dword ptr [ebp-A8], 2
014BD11C . FFD3 call ebx
014BD11E . 50 push eax
014BD11F . 8D45 9C lea eax, dword ptr [ebp-64]
014BD122 . 8D8D 48FFFFFF lea ecx, dword ptr [ebp-B8]
014BD128 . 50 push eax
014BD129 . 51 push ecx
014BD12A . FFD7 call edi
014BD12C . 8D95 48FFFFFF lea edx, dword ptr [ebp-B8]
014BD132 . 8D85 68FFFFFF lea eax, dword ptr [ebp-98]
014BD138 . 52 push edx
014BD139 . 50 push eax
014BD13A . FF15 C8114000 call dword ptr [<&msvbvm60.__vbaStrVa>; msvbvm60.__vbaStrVarVal
014BD140 . 50 push eax ; 获得一位的ascii码值
014BD141 . FF15 50104000 call dword ptr [<&msvbvm60.rtcAnsiVal>; msvbvm60.rtcAnsiValueBstr
014BD147 . 8D95 E8FEFFFF lea edx, dword ptr [ebp-118]
014BD14D . 8D4D 8C lea ecx, dword ptr [ebp-74]
014BD150 . 66:8985 F0FEF>mov word ptr [ebp-110], ax
014BD157 . C785 E8FEFFFF>mov dword ptr [ebp-118], 2
014BD161 . FFD6 call esi
014BD163 . 8D8D 68FFFFFF lea ecx, dword ptr [ebp-98]
014BD169 . FF15 D0124000 call dword ptr [<&msvbvm60.__vbaFreeS>; msvbvm60.__vbaFreeStr
014BD16F . 8D8D 48FFFFFF lea ecx, dword ptr [ebp-B8]
014BD175 . 8D95 58FFFFFF lea edx, dword ptr [ebp-A8]
014BD17B . 51 push ecx
014BD17C . 52 push edx
014BD17D . 6A 02 push 2
014BD17F . FF15 38104000 call dword ptr [<&msvbvm60.__vbaFreeV>; msvbvm60.__vbaFreeVarList
014BD185 . B8 02800000 mov eax, 8002
014BD18A . 83C4 0C add esp, 0C
014BD18D . 8985 F8FEFFFF mov dword ptr [ebp-108], eax
014BD193 . 8985 E8FEFFFF mov dword ptr [ebp-118], eax
014BD199 . 8D45 8C lea eax, dword ptr [ebp-74]
014BD19C . 8D8D F8FEFFFF lea ecx, dword ptr [ebp-108]
014BD1A2 . 50 push eax
014BD1A3 . 8D95 58FFFFFF lea edx, dword ptr [ebp-A8]
014BD1A9 . 51 push ecx
014BD1AA . 52 push edx
014BD1AB . C785 00FFFFFF>mov dword ptr [ebp-100], 30 ; 判断是否是数学
014BD1B5 . C785 F0FEFFFF>mov dword ptr [ebp-110], 39
014BD1BF . FF15 20124000 call dword ptr [<&msvbvm60.__vbaVarCm>; msvbvm60.__vbaVarCmpLt
014BD1C5 . 50 push eax
014BD1C6 . 8D45 8C lea eax, dword ptr [ebp-74]
014BD1C9 . 8D8D E8FEFFFF lea ecx, dword ptr [ebp-118]
014BD1CF . 50 push eax
014BD1D0 . 8D95 48FFFFFF lea edx, dword ptr [ebp-B8]
014BD1D6 . 51 push ecx
014BD1D7 . 52 push edx
014BD1D8 . FF15 08114000 call dword ptr [<&msvbvm60.__vbaVarCm>; msvbvm60.__vbaVarCmpGt
014BD1DE . 50 push eax
014BD1DF . 8D85 38FFFFFF lea eax, dword ptr [ebp-C8]
014BD1E5 . 50 push eax
014BD1E6 . FF15 44114000 call dword ptr [<&msvbvm60.__vbaVarOr>; msvbvm60.__vbaVarOr
014BD1EC . 50 push eax
014BD1ED . FF15 EC104000 call dword ptr [<&msvbvm60.__vbaBoolV>; msvbvm60.__vbaBoolVarNull
014BD1F3 . 66:85C0 test ax, ax
014BD1F6 . 74 4A je short 014BD242 ; 是数学,就在这里跳
014BD1F8 . 8D4D 8C lea ecx, dword ptr [ebp-74]
014BD1FB . 51 push ecx
014BD1FC . FF15 54104000 call dword ptr [<&msvbvm60.__vbaStrEr>; msvbvm60.__vbaStrErrVarCopy
014BD202 . 8985 60FFFFFF mov dword ptr [ebp-A0], eax ; 做一个转换
014BD208 . 8D95 58FFFFFF lea edx, dword ptr [ebp-A8]
014BD20E . 6A 01 push 1
014BD210 . 8D85 48FFFFFF lea eax, dword ptr [ebp-B8]
014BD216 . 52 push edx
014BD217 . 50 push eax
014BD218 . C785 58FFFFFF>mov dword ptr [ebp-A8], 8
014BD222 . FF15 94124000 call dword ptr [<&msvbvm60.rtcRightCh>; msvbvm60.rtcRightCharVar
014BD228 . 8D95 48FFFFFF lea edx, dword ptr [ebp-B8]
014BD22E . 8D8D 6CFFFFFF lea ecx, dword ptr [ebp-94]
014BD234 . FFD6 call esi
014BD236 . 8D8D 58FFFFFF lea ecx, dword ptr [ebp-A8]
014BD23C . FF15 24104000 call dword ptr [<&msvbvm60.__vbaFreeV>; msvbvm60.__vbaFreeVar
014BD242 > 8D8D 7CFFFFFF lea ecx, dword ptr [ebp-84]
014BD248 . 8D95 6CFFFFFF lea edx, dword ptr [ebp-94]
014BD24E . 51 push ecx
014BD24F . 8D85 58FFFFFF lea eax, dword ptr [ebp-A8]
014BD255 . 52 push edx
014BD256 . 50 push eax
014BD257 . FF15 54124000 call dword ptr [<&msvbvm60.__vbaVarAd>; msvbvm60.__vbaVarAdd
014BD25D . 8BD0 mov edx, eax
014BD25F . 8D8D 7CFFFFFF lea ecx, dword ptr [ebp-84]
014BD265 . FFD6 call esi
014BD267 . 8D8D 98FEFFFF lea ecx, dword ptr [ebp-168]
014BD26D . 8D95 A8FEFFFF lea edx, dword ptr [ebp-158]
014BD273 . 51 push ecx
014BD274 . 8D45 CC lea eax, dword ptr [ebp-34]
014BD277 . 52 push edx
014BD278 . 50 push eax
014BD279 . FF15 C4124000 call dword ptr [<&msvbvm60.__vbaVarFo>; msvbvm60.__vbaVarForNext
014BD27F .^ E9 28FEFFFF jmp 014BD0AC
014BD284 > 8B4D 08 mov ecx, dword ptr [ebp+8]
我的硬盘ID是:5JT4X14R
我的bios ID是:11/03/2004-i865PE-6A79ZG0SC-00
中间值:5AJ7T94ZXG1SCR
我的机器码:5547494081134725
这是两个生成机器码的循环。第一个循环生成中间值,比较容易看明白。可第二个就不是很明白了。第二个循环是把中间值生成机器码。有个转换,找不到,不明白是什么意思.__vbaStrErrVarCopy。高手给看一下!
感想:汇编这东西,看多了就想吐!
能力值:
( LV2,RANK:10 )
22 楼
刚刚搞明白了机器码的生成,不知道对不对。
我的硬盘ID是:5JT4X14R
我的bios ID是:11/03/2004-i865PE-6A79ZG0SC-00
中间值:5AJ7T94ZXG1S4CR-
机器码:5547494081134725
中间值是硬盘ID和bios id中的一部分,交替生成的。
5JT4X14R
A79ZGSC-
-------------
5AJ7T94ZXG1S4CR-
不知道那个零是什么时候没的。没有仔细看代码,呵呵!
然后是中间值生成机器码。数学部分保留,字母就成ASCII码,然后成就十进行的数对应的字符串,取右边的一位。
字母 十六进行 十进行
A 41 65
J 4A 74
T 54 84
Z 5A 90
X 58 88
G 47 71
S 53 83
C 43 67
R 52 82
- 2D 45
-------------------------
5547494081134725
到此,机器码的生成分析已经完成
能力值:
( LV2,RANK:10 )
25 楼
因为算法计算器算出的结果总是对不上,那个Crypto++也不会用,文档太少了,搞不明白。所以我想了个着。LuoX30NDl.dll里有各种算法的库函数。于是想到就用它了。用waspack把它脱掉,dll2lib做出lib来,根据调试的过程分析出三个函数的原型:
char* DesEn(char*,char*)
char* DesDe(char*,char*)
char* MD5En(char*)
奇迹是在自己的程序里写了一个MD5的算法,我就用库里的了。
脱完了,用PEiD看了一下,Borland Delphi DLL,看来要用stdcall了。可生成的lib是cdecl的,连接之后把找不到的名字又粘回到dll2lib中,重新导出。一切就OK了。
最后,所用的代码如下:
//DLL2Lib生成的文件
// crypto_supp.h : supplement header file for crypto.dll
// Author: DLL to Lib version 1.4
// Date: Tuesday, January 23, 2007
// Description: The declaration of the crypto.dll's entry-point function.
// Prototype: BOOL WINAPI xxx_DllMain(HINSTANCE hinstance, DWORD fdwReason, LPVOID lpvReserved);
// Parameters:
// hinstance
// Handle to current instance of the application. Use AfxGetInstanceHandle()
// to get the instance handle if your project has MFC support.
// fdwReason
// Specifies a flag indicating why the entry-point function is being called.
// lpvReserved
// Specifies further aspects of DLL initialization and cleanup. Should always
// be set to NULL;
// Comment: Please see the help document for detail information about the entry-point
// function
// Homepage: http://www.binary-soft.com
// Technical Support: support@binary-soft.com
/////////////////////////////////////////////////////////////////////
#if !defined(D2L_CRYPTO_SUPP_H)
#define D2L_CRYPTO_SUPP_H
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#ifdef __cplusplus
extern "C" {
#endif #include <windows.h>
/* This is crypto.dll's entry-point function. You should call it to do necessary
initialization and finalization. */
BOOL WINAPI CRYPTO_DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved); #ifdef __cplusplus
}
#endif
#endif // !defined(D2L_CRYPTO_SUPP_H)
/////////////////////////////////////////////////
/********************************************************************
*
* 文件名称:DLL.h
* 摘 要:Dll2Lib导出库的函数原型
*
* 当前版本:v0.1
* 作 者:福柯
* 完成日期:2007年01月23日
*
* Copyright (c) 2007,Programming Lab.
* All rights reserved.
*********************************************************************/
#ifdef DLL_EXPORTS
#define DLL_API __declspec(dllexport)
#else
#define DLL_API __declspec(dllimport)
#endif
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#ifdef __cplusplus
extern "C" {
#endif
DLL_API char* PASCAL DesEn(char* data,char* key);
DLL_API char* PASCAL DesDe(char* data,char* key);
DLL_API char* PASCAL MD5En(char* data);
#ifdef __cplusplus
}
#endif
////////////////////////////////////////////////////////
/********************************************************************
*
* 文件名称:main.cpp
* 摘 要:实验用dll2lib做出来的库
*
* 当前版本:v0.1
* 作 者:福柯
* 完成日期:2007年01月23日
*
* Copyright (c) 2007,Programming Lab.
* All rights reserved.
*********************************************************************/
#include <iostream>
#include <string>
#include "crypto_supp.h"
#include "DLL.h"
using namespace std;
int main(int argc, char *argv[],char *env[])
{
string res;
CRYPTO_DllMain(GetModuleHandle(0),DLL_PROCESS_ATTACH,0);
res=DesEn("37159371","Jrji48HJFwer428KdEJ9");
cout<<res.substr(0,res.size()-5)<<endl;
res=DesDe("C2567E70BC78013D","88372239");
cout<<res.substr(0,res.size()-5)<<endl;
res=MD5En("0F17EC90DCB27C03");
cout<<res.substr(0,res.size()-5)<<endl;
CRYPTO_DllMain(GetModuleHandle(0),DLL_PROCESS_DETACH,0);
char c=0;
while(cin>>c);
return 0;
}
////////////////////////////////////////
这个库不知道谁做的,加密后的代码总有个尾巴,ksaiy。管它呢,反正是能用了。只是不明白哪个是key哪个是data.