存档

2010年8月 的存档

内存中载入DLL并执行(C代码,兼容vc,bcb)

2010年8月10日 1 条评论

系统载入dll的整体过程可以分为以下几个步骤:

1、将dll文件内容载入内存,并按照对齐粒度进行对齐并设置对应的各个内存区间的权限属性;

2、如果dll有重定位表,则进行重定位操作;

3、填充dll的导入表;

4、用ATTACH参数调用dll的入口函数进行初始化,之后返回imagebase即可。

因此了解了系统载入dll的整体流程,也就可以自己实现将dll载入内存并执行,这种方法对于加密等有一定意义。

但由于自己载入内存后,系统api GetProcAddress函数失效,因此在自己实现loadlibrary函数的同时必须自己实现此函数。

下面附上参考网上现有代码原理后写的代码。

进过少量测试,暂未发现bug,如发现bug,欢迎提出。

DLLLoader.h文件内容如下

//---------------------------------------------------------------------------
 
#ifndef DLLLoaderH
#define DLLLoaderH
 
#ifdef __cplusplus
extern "C" {
#endif
 
#include <stdio .h>
#include <windows .h>
//---------------------------------------------------------------------------
 
//public functions
 
DWORD LoadDllFromMemory(LPVOID lpBuffer,__int64 BufferSize);
DWORD FreeDllFromMemory(LPVOID lpBaseAddress);
FARPROC GetDllProcAddress(LPVOID imagebase,char * FuncName);
 
// private functions
 
DWORD AlignDllToMemory(LPVOID lpBuffer,PIMAGE_DOS_HEADER &dosHeader,PIMAGE_NT_HEADERS &ntHeader,__int64 BufferSize);   //从内存载入到对齐内存
DWORD GetAlignedSize(DWORD Origin,DWORD Alignment);                                                                    //计算对齐后的位置
DWORD GetImageSize(PIMAGE_NT_HEADERS ntHeader,PIMAGE_SECTION_HEADER sectionHeaders);                                   //计算总imagesize
DWORD Relocation(PIMAGE_NT_HEADERS ntHeader,LPVOID NewBase);                                                           //修正重定位
DWORD FillImportTable(LPVOID imagebase,PIMAGE_NT_HEADERS ntHeader);                                                    //填充IAT
 
 
//entrypoint function type
typedef UINT (CALLBACK * LPENTRYPOINT) (HANDLE hInstance, DWORD Reason, LPVOID Reserved);
 
 
#ifdef __cplusplus
}
#endif
 
#endif
</windows></stdio>

阅读全文…

分类: Computer 标签: ,

aXmag PDF to Flash Converter 绿色破解版

2010年8月5日 13 条评论

Why AXPDF PDF to Flash Converter?

It’s because we are using vector technology, vector files are very much smaller and much faster to transfer via network, and, it will be always highest quality even magnify limitlessly. See comparison details:

AXPDF uses Vector solution Others are Raster type output
Original PDF size at 308KB,
Created Online magazine file at 779KB
Download example
Same original PDF size at 308KB,
Created Online magazine file at 5.23 MB
(7 times the size of AXPDF solution)
1M connection, downloading takes: 0.78 Sec 1M connection, downloading takes: 5.23 Sec
Always highest quality on both text and icons: Blurry for all texts and icons:

Key Features

  • Convert PDF into Flash files including:
    Digital magazines, online magazines, digital catalogs, flash magazine, online manuals, interactive flyers, reports, whitepapers, newsletters, brochures, flipping photo albums and other digital documents in PDF formats.
  • Page flip simulating:
    Feel ease flipping the online e-book and have fun in reading.
  • Quick loading e-pages:
    Pages are processed for high speed online loading, with few seconds all pages will be cashed. No snoring waiting for pages loading. 
  • Zoom viewing with variable resolution:
    Zoom dynamic, zoom in, zoom all, zoom out, either way and pan pages to view details. 
  • Hyperlinks detective:
    Automatically detect http links in PDF and create hyperlinks in SWF.
  • Stand-alone version:
    Works independently of Adobe PDF reader and other 3rd party viewers.

aXmag的PDF to Flash Converter是个pdf转swf的软件,支持翻页型效果,之前52ba有位朋友求破,软件算法比较繁琐,就不去写注册机了,直接爆破之。 阅读全文…

分类: Computer 标签: ,