11Oct/094
Password Reader for CuteFTP Pro 8【含工具下载】
平时都直接用CuteFTP来管理各个服务器,竟然把密码都忘记掉了。痛定思痛,确定从CuteFTP中把密码挖出来。
CuteFTP Pro中,密码显示都是*号,即使用里面的站点管理器(Site Manager)导出,用的也是星号。用Spy++查看密码框,是空的,也就是说那个框只能用来输入。
那么,要找出密码,可以有三种方法:
一、抓包
用Wireshark(即Ethereal)等工具,可以简单地根据FTP协议分析出来。这个方法以前用过,但似乎对于SSL等连接,这种方法变得不切实际。
二、分析内存
用OllyDbg等工具,调试分析之,然后从内存中找出来。此方法费时费力,每次找都要花一番功夫。
三、读取CuteFTP Pro的文件
我们知道CuteFTP Pro的密码都保存在sm.dat文件中。那么只要分析出sm.dat的结构和密码存储的方法,就可以读出来了。
分析过程不多说,只说结果:
在sm.dat文件中,对于每个站点,都用相同的结构。每个站点前是 0B 00 00 00,接下去是“记录名”,然后是几条类型数据,再下去就是站点,用户名,密码等。(其他不累赘了)密码当然不是用明文,而是加密过的。加密后的密码和原文长度一致,是一一对应的。下面是我分析出其规则后写的解密算法:
uint L = code & 0xF; L = L > 7 ? L - 8 : L + 8; uint H = ((code & (byte)0xF0)) - 0x80; H = H > 0x30 ? H - 0x40 : H + 0x40; byte PCode = (byte)(L + H);
随手写了个CuteFTP Pro 的密码读取器,用MPL协议发布
CuteFTP Pro Password Reader
上面是编译后的文件下载地址。
注意:运行这个程序需要.NET Framework 2.0 或以上版本
想对其扩展的朋友,可以联系我拿源码。

The Password Reader for CuteFTP Pro 8【含工具下载】 by Neio Notes, unless otherwise expressly stated, is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
4 Comments
加法分解 »
« 为Apache2添加URL重写
有关调用实时(JIT)调试而不是此对话框的详细信息,
请参见此消息的结尾。
************** 异常文本 **************
System.IO.EndOfStreamException: 无法在流的结尾之外进行读取。
在 System.IO.__Error.EndOfFile()
在 System.IO.BinaryReader.FillBuffer(Int32 numBytes)
在 System.IO.BinaryReader.ReadInt32()
在 cuteftppwd.smReader.ReadOne(Account& account)
在 cuteftppwd.CuteFTPPWD.loadSmdatToolStripMenuItem_Click(Object sender, EventArgs e)
在 System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
在 System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
在 System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
在 System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
在 System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
在 System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
在 System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
在 System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
在 System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
在 System.Windows.Forms.Control.WndProc(Message& m)
在 System.Windows.Forms.ScrollableControl.WndProc(Message& m)
在 System.Windows.Forms.ToolStrip.WndProc(Message& m)
在 System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
在 System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** 已加载的程序集 **************
mscorlib
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.4927 (NetFXspW7.050727-4900)
基本代码: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
—————————————-
cuteftppwd
程序集版本: 0.1.0.0
Win32 版本: 0.1.0.0
基本代码: file:///C:/Users/Administrator/Desktop/cuteftppwd.exe
—————————————-
System.Windows.Forms
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.4927 (NetFXspW7.050727-4900)
基本代码: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
—————————————-
System
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.4927 (NetFXspW7.050727-4900)
基本代码: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
—————————————-
System.Drawing
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.4927 (NetFXspW7.050727-4900)
基本代码: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
—————————————-
mscorlib.resources
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.4927 (NetFXspW7.050727-4900)
基本代码: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
—————————————-
System.Windows.Forms.resources
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.4927 (NetFXspW7.050727-4900)
基本代码: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms.resources/2.0.0.0_zh-CHS_b77a5c561934e089/System.Windows.Forms.resources.dll
—————————————-
************** JIT 调试 **************
要启用实时(JIT)调试,
该应用程序或计算机的 .config 文件(machine.config)的 system.windows.forms 节中必须设置
jitDebugging 值。
编译应用程序时还必须启用
调试。
例如:
启用 JIT 调试后,任何无法处理的异常
都将被发送到在此计算机上注册的 JIT 调试器,
而不是由此对话框处理。
———————————————–
以上是错误信息,我的OS是win7 ,不清楚这个错误和什么有关系。。。。
你好,因为不同版本sm.dat格式的不同,造成了这个错误。
我再另外试验一下CuteFTP Pro 8 的其他版本,然后修正一下读取文件的方法后再贴出来。
或者你也可以按照我给出的算法去手工分析你的sm.dat。
希望你可以做出8.3.4.0007
有关调用实时(JIT)调试而不是此对话框的详细信息,
请参见此消息的结尾。
************** 异常文本 **************
System.IO.EndOfStreamException: 无法在流的结尾之外进行读取。
在 System.IO.__Error.EndOfFile()
在 System.IO.BinaryReader.ReadByte()
在 cuteftppwd.smReader.ReadOne(Account& account)
在 cuteftppwd.CuteFTPPWD.loadSmdatToolStripMenuItem_Click(Object sender, EventArgs e)
在 System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
在 System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
在 System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
在 System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
在 System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
在 System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
在 System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
在 System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
在 System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
在 System.Windows.Forms.Control.WndProc(Message& m)
在 System.Windows.Forms.ScrollableControl.WndProc(Message& m)
在 System.Windows.Forms.ToolStrip.WndProc(Message& m)
在 System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
在 System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** 已加载的程序集 **************
mscorlib
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.4952 (win7RTMGDR.050727-4900)
基本代码: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
—————————————-
cuteftppwd
程序集版本: 0.1.0.0
Win32 版本: 0.1.0.0
基本代码: file:///D:/cuteftppwd/cuteftppwd.exe
—————————————-
System.Windows.Forms
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.4927 (NetFXspW7.050727-4900)
基本代码: file:///C:/windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
—————————————-
System
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.4927 (NetFXspW7.050727-4900)
基本代码: file:///C:/windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
—————————————-
System.Drawing
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.4927 (NetFXspW7.050727-4900)
基本代码: file:///C:/windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
—————————————-
mscorlib.resources
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.4952 (win7RTMGDR.050727-4900)
基本代码: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
—————————————-
System.Windows.Forms.resources
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.4927 (NetFXspW7.050727-4900)
基本代码: file:///C:/windows/assembly/GAC_MSIL/System.Windows.Forms.resources/2.0.0.0_zh-CHS_b77a5c561934e089/System.Windows.Forms.resources.dll
—————————————-
************** JIT 调试 **************
要启用实时(JIT)调试,
该应用程序或计算机的 .config 文件(machine.config)的 system.windows.forms 节中必须设置
jitDebugging 值。
编译应用程序时还必须启用
调试。
例如:
启用 JIT 调试后,任何无法处理的异常
都将被发送到在此计算机上注册的 JIT 调试器,
而不是由此对话框处理。
你好,以上是错误信息,我的OS是win7 ,cuteftp版本是 8.0.5 build 02.06.2007.1,能帮忙解决这个问题吗?