请教,有一个问题难倒我,无从下手,HOOK XCDZIP35.OCX的问题

wzswgbx 2018-08-19 09:30:51
有个程序,调用XCDZIP35.OCX进程压缩,调用这个OCX肯定要给参数它,我想获取他的输入参数(内有压缩密码),不知怎么弄,怎么下手,请问一下该如何处理,谢谢!
...全文
555 20 打赏 收藏 转发到动态 举报
写回复
用AI写文章
20 条回复
切换为时间正序
请发表友善的回复…
发表回复
wzswgbx 2018-08-23
  • 打赏
  • 举报
回复
上面代码是加控件XCEEDZIP后的函数,跟我上图OCX查看很多不一样,有影响吗
wzswgbx 2018-08-23
  • 打赏
  • 举报
回复
我用OCX查看了XCDZIP35.OCX的函数,有个问题,上面的OCX看到了这些,但注册的文件名是XCDZIP35.OCX,注册后控件是XCEEDZIP.OCX,在MFC中加入这个XCEEDZIP的控件,发现函数跟用OCX看到的不一样,这无法理解
class CXceedZip : public CWnd
{
protected:
DECLARE_DYNCREATE(CXceedZip)
public:
CLSID const& GetClsid()
{
static CLSID const clsid
= { 0xb26f6246, 0x4c7d, 0x11d1, { 0x91, 0xe, 0x0, 0x60, 0x8, 0x7, 0x16, 0x3f } };
return clsid;
}
virtual BOOL Create(LPCTSTR lpszClassName,
LPCTSTR lpszWindowName, DWORD dwStyle,
const RECT& rect,
CWnd* pParentWnd, UINT nID,
CCreateContext* pContext = NULL)
{ return CreateControl(GetClsid(), lpszWindowName, dwStyle, rect, pParentWnd, nID); }

BOOL Create(LPCTSTR lpszWindowName, DWORD dwStyle,
const RECT& rect, CWnd* pParentWnd, UINT nID,
CFile* pPersist = NULL, BOOL bStorage = FALSE,
BSTR bstrLicKey = NULL)
{ return CreateControl(GetClsid(), lpszWindowName, dwStyle, rect, pParentWnd, nID,
pPersist, bStorage, bstrLicKey); }

// Attributes
public:
BOOL GetAbort();
void SetAbort(BOOL);
short GetCompression();
void SetCompression(short);
BOOL GetClearDisks();
void SetClearDisks(BOOL);
CString GetExtractDirectory();
void SetExtractDirectory(LPCTSTR);
BOOL GetIncludeDirectoryEntries();
void SetIncludeDirectoryEntries(BOOL);
BOOL GetIncludeHiddenFiles();
void SetIncludeHiddenFiles(BOOL);
BOOL GetIncludeVolumeLabel();
void SetIncludeVolumeLabel(BOOL);
CString GetModifiedDate();
void SetModifiedDate(LPCTSTR);
BOOL GetMoveFiles();
void SetMoveFiles(BOOL);
BOOL GetMultidiskMode();
void SetMultidiskMode(BOOL);
short GetOverwrite();
void SetOverwrite(short);
CString GetPassword();
void SetPassword(LPCTSTR);
BOOL GetRecurse();
void SetRecurse(BOOL);
CString GetStoredExtensions();
void SetStoredExtensions(LPCTSTR);
CString GetTempPath();
void SetTempPath(LPCTSTR);
BOOL GetUsePaths();
void SetUsePaths(BOOL);
BOOL GetUseTempFile();
void SetUseTempFile(BOOL);
CString GetZipFileName();
void SetZipFileName(LPCTSTR);
short GetFileCount();
void SetFileCount(short);
CString GetZipComment();
void SetZipComment(LPCTSTR);
CString GetFilesToProcess();
void SetFilesToProcess(LPCTSTR);
BOOL GetSelfExtracting();
void SetSelfExtracting(BOOL);
CString GetSfxBinary();
void SetSfxBinary(LPCTSTR);
CString GetSfxConfigFile();
void SetSfxConfigFile(LPCTSTR);
CString GetSfxExtractDirectory();
void SetSfxExtractDirectory(LPCTSTR);
CString GetSfxRunExePath();
void SetSfxRunExePath(LPCTSTR);
CString GetSfxReadmePath();
void SetSfxReadmePath(LPCTSTR);
CString GetSfxDefaultPassword();
void SetSfxDefaultPassword(LPCTSTR);
short GetSfxOverwrite();
void SetSfxOverwrite(short);
BOOL GetSfxPromptForDirectory();
void SetSfxPromptForDirectory(BOOL);
BOOL GetSfxShowProgress();
void SetSfxShowProgress(BOOL);
BOOL GetSfxPromptForPassword();
void SetSfxPromptForPassword(BOOL);
BOOL GetSfxPromptCreateDirectory();
void SetSfxPromptCreateDirectory(BOOL);
CString GetSfxProgramGroup();
void SetSfxProgramGroup(LPCTSTR);
CString GetSfxProgramGroupItems();
void SetSfxProgramGroupItems(LPCTSTR);
CString GetSfxRegisterExtensions();
void SetSfxRegisterExtensions(LPCTSTR);
CPicture GetSfxIcon();
void SetSfxIcon(LPDISPATCH);
BOOL GetSfxInstallMode();
void SetSfxInstallMode(BOOL);

// Operations
public:
CString GetSfxPrompts(short SfxPromptID);
void SetSfxPrompts(short SfxPromptID, LPCTSTR lpszNewValue);
CString GetSfxStrings(short SfxStringID);
void SetSfxStrings(short SfxStringID, LPCTSTR lpszNewValue);
CString GetSfxButtons(short SfxButtonID);
void SetSfxButtons(short SfxButtonID, LPCTSTR lpszNewValue);
CString GetSfxMessages(short SfxMessageID);
void SetSfxMessages(short SfxMessageID, LPCTSTR lpszNewValue);
BOOL GetSfxShowMessages(short SfxMessageID);
void SetSfxShowMessages(short SfxMessageID, BOOL bNewValue);
short Test();
short Fix(BOOL Aggressive);
short Add(short Cmd);
short Extract(short Cmd);
short List();
short UpdateZipDate();
short Delete();
short GetFileInfo(short Index);
short StringCompress(BSTR* Source, BSTR* Target);
short StringUncompress(BSTR* Source, BSTR* Target);
long MemCompress(long* SourceBuf, long SourceSize, long* TargetBuf, long TargetSize);
long MemUncompress(long* SourceBuf, long SourceSize, long* TargetBuf);
long MemOriginalSize(long* SourceBuf);
short MakeSelfExtracting();
void SfxResetDefaultStrings();
void AboutBox();
};
蒋晟 2018-08-23
  • 打赏
  • 举报
回复
在你的控件类里加个原控件的成员变量,在OnCreate的时候跟着调用变量的CreateControl
赵4老师 2018-08-22
  • 打赏
  • 举报
回复
引用 11 楼 wzswgbx 的回复:
赵4老师,你给的是大方向,我们这些只有基本功,要到高手这个级别很难,有时候问题又急着解决,所以,我们就到处找资料查资料,总之,是我们道行还不行,你没错

这话我咋听得那么舒服呢?
赵4老师 2018-08-22
  • 打赏
  • 举报
回复
引用 13 楼 jiangsheng 的回复:
MFC的ActiveX封装类向导会生成一个基于CWnd的类,里面的方法类型拿来复制一下就能做一个聚合控件了。简单来说就是在你的控件(COleControl)里创建个原版的ActiveX然后所有对你的控件的调用都转发到那个原版的ActiveX——这样你设个断点就能看到参数了。

特洛伊木马的思路用在安全领域,似乎永远不会过时。
wzswgbx 2018-08-22
  • 打赏
  • 举报
回复
已经建了一个MFC OCX,把XCDZIP35控件也加进来了,下一步如何处理呢
蒋晟 2018-08-22
  • 打赏
  • 举报
回复
MFC的ActiveX封装类向导会生成一个基于CWnd的类,里面的方法类型拿来复制一下就能做一个聚合控件了。简单来说就是在你的控件(COleControl)里创建个原版的ActiveX然后所有对你的控件的调用都转发到那个原版的ActiveX——这样你设个断点就能看到参数了。
wzswgbx 2018-08-22
  • 打赏
  • 举报
回复
引用 13 楼 jiangsheng 的回复:
MFC的ActiveX封装类向导会生成一个基于CWnd的类,里面的方法类型拿来复制一下就能做一个聚合控件了。简单来说就是在你的控件(COleControl)里创建个原版的ActiveX然后所有对你的控件的调用都转发到那个原版的ActiveX——这样你设个断点就能看到参数了。


太厉害了,就是说我这个控件,可以将原控件放在我的控件里使用是吧,不过有点复杂,我新建的控件接口是不是要跟原控件接口相同,还有如何转发,这个对我来说难度很大,我将XCDZIP35.OCX查看了一下:

蒋晟,你看能不能多多指导一下,万分感谢
赵4老师 2018-08-21
  • 打赏
  • 举报
回复
赵4老师 2018-08-21
  • 打赏
  • 举报
回复
引用 7 楼 wzswgbx 的回复:
赵4老师,谢谢,是这样的,主程序是VB-P-CODE,调用了VB写的P-CODE的DLL,DLL再调用XCDZIP35.OCX,用OD无法跟进DLL,从DLL的导出可以看到调用了OCX,我试试你提供的程序看看

大家是不是总觉得我回答问题天马行空不接地气?
wzswgbx 2018-08-21
  • 打赏
  • 举报
回复
蒋晟是元老级的,十五六年前我就进这个论坛,后来生活所迫,很少进来,养家要紧,现在年过四十,想重返江湖,发现老了
wzswgbx 2018-08-21
  • 打赏
  • 举报
回复
赵4老师,你给的是大方向,我们这些只有基本功,要到高手这个级别很难,有时候问题又急着解决,所以,我们就到处找资料查资料,总之,是我们道行还不行,你没错
wzswgbx 2018-08-20
  • 打赏
  • 举报
回复
蒋晟,不过XCDZIP35.OCX导出函数那么多,好像很麻烦
wzswgbx 2018-08-20
  • 打赏
  • 举报
回复
蒋晟,好办法,有没有参考资料,谢谢
wzswgbx 2018-08-20
  • 打赏
  • 举报
回复
赵4老师,谢谢,是这样的,主程序是VB-P-CODE,调用了VB写的P-CODE的DLL,DLL再调用XCDZIP35.OCX,用OD无法跟进DLL,从DLL的导出可以看到调用了OCX,我试试你提供的程序看看
赵4老师 2018-08-20
  • 打赏
  • 举报
回复
赵4老师 2018-08-19
  • 打赏
  • 举报
回复
WinAPIOverride
蒋晟 2018-08-19
  • 打赏
  • 举报
回复
自己写个名字叫做XCDZIP35.OCX的组件,把XCDZIP35.OCX的注册信息替换掉
smwhotjay 2018-08-19
  • 打赏
  • 举报
回复
不清楚ocx,如果ocx就是跟exe一样,那么就可以hook CreateProcess
wzswgbx 2018-08-19
  • 打赏
  • 举报
回复
赵4老师,这个不是api,是第三方的OCX

3,245

社区成员

发帖
与我相关
我的任务
社区描述
ATL,Active Template Library活动(动态)模板库,是一种微软程序库,支持利用C++语言编写ASP代码以及其它ActiveX程序。
社区管理员
  • ATL/ActiveX/COM社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧