IDA Reverse Engineering(逆向工程)
歪酷博客
日 历
网志文件夹
· 所有网志
· StockAnalysis
· IDA Overview
· IDA Version
· IDA Tips(经验之谈)
· Complete Research
· Unclosed
· C++ Implementation
· FlexibleDataSpecification
· Debugger
· Java VM
· Brew & REX & ARM
· Video Codec(H.264/MPEG-4)
· Cross the line
· Who am I
· Favorite URLs
· 未分类
最 新 的 评 论
搜 索
友 情 链 接
· 歪酷博客
· 管理我的Blog
· 3D 课程网站
· IDA 官方网站
· 某访客的网站
· 一个symbian的小站
· net tools
· 布格阁
· 【常见电脑故障集】
· 卡尔王'S BLOG(好像是北师大的某个X)
· Iczelion's Win32 Assembly Homepage
· cpp lib
· 无聊时看到的一个blog,看姑娘们记流水
· 龙星计划
· .Net 博客堂
· medc 上见过的
· 自动翻译网站
· Quick Reference
· Introduction to Reverse Engineering Software
· 基于寄存器的虚拟机(open source)
· 有很多education
· 一个算法列表
· 一个口气像IDA内部人员的人的blog,还没有细看
· WordNet

订阅 RSS

0058387

歪酷博客

我将在这里放上我使用IDA进行逆向工程(静态)的心得,算是头脑之外另外一个存放自己足迹的地方.至于动态分析的部分也会慢慢添加...
It's a place for recording my Hints on Reverse Engineering Project .
Rafael @ 2009-06-05 05:04

不怎么喜欢用防病毒软件实时监控系统拖慢运行速度,所以我一般只用一个网络放火墙,然后IE的设置都比较的严格。flash什么的东西一般都是无法直接在我电脑上运行的,除非我肯把url加入信任站点列表。但是有些时候站点的破广告什么的东西比较麻烦,后来还是自己试了一个办法来解决。

将一个类似于 http://site.com/picaddr/*.* 的字符串加入  IE的受限站点列表中间,就能够屏蔽这个站点某个目录下的广告图片的显示,同样也可以适用于禁止掉某些script文件。



 
Rafael @ 2009-05-09 03:35

In recent days, I have contacted the UE customer service for reporting some issue on UE 15.00.0.1043.
Comparing to UE 12, UE 15 finally provide us correct translation in macro defination help instead of translate macro command into chinese.

1. UE has flaw in supporting UTF-8 format. 
When searching in UTF-8 files, UE 12 will improperly handle the line forward character. 
When you open a text file, switch to hexical mode, and save it as UTF-8 format for two times, you'll get a meaningless file. 

2. Find in Files will fail on some  Chinese file names and paths . For example, directory name containing chinese character "双" (little-endian saved as 0xCB 0xAB) will definitely fail the search.

3. UE regular expression engine can't accept a normal '^' character. UE regular expression engine takes '^' as a escape character, but no escape string can represent a normal '^' character. For UE's Unix regular expression engine it can take '\' as escape character and "\" represent a normal '\' character. 

4. In my PC, open a file only containing  "木士"(0xC4 0xBE 0xCA 0xBF), the display is inrecognizable. but when I use ctrl-H change to hexical mode, I can get the correct chinese display. I write a program to get the font.

open the file only containing chinese characters "木士"
Current Font:[Arial Unicode MS] charset:0x00000086(GB2312_CHARSET)
 
after ctrl-H to hexical mode, font change and display is ok.
Current Font:[Courier New] charset:0x00000000(ANSI_CHARSET)

and I found notepad also shows similar behavior. the inrecognizable chars display when notepad open file default as UTF-8 encoding. and I found UE also can display right when I explicit open the file with "ASCII" option instead of "Auto Check ASCII/Unicode" option.  so I think this incognizable chars issue should be caused by translating GB2312 encoded chinese chars from UTF-8 encoding to GB2312 encoding for display. Why default encoding is UTF-8...I don't know. and I have no language bar along with yesterday's bug checks six times in half a hour, god damned HP oem vista home basic 32bit.



 
Rafael @ 2009-04-16 09:19

整理之前的调试器程序,发现之前好像走到了误区。

之前的调试器都是直接在 import function address table的位置放置数据读写断点来截取系统函数调用。这种方式总是受制于硬件断点的个数。

现在想想,其实可以用远程线程一类的方式,直接修改系统函数指针,用一个 filter function 的方式来 trace 这些调用, 比如 CreateFile。好像以前做 file system filter driver 的时候遇到过 shim.dll 造成的问题,忘了具体的细节了,需要想想有没有影响。似乎这么做的话就不需要调试相关的功能了


 
Rafael @ 2009-04-16 09:04

花了几天总算完成了以前没有完成的任务,使用XML文件描述格式化的数据,修改了PD4的patch程序成为可以使用外部数据格式描述的标准化程序,以后可以简单的编写不同的XML文件来支持不同游戏的存档修改了,也可以用它来dump exe header data,java class file一类的格式数据导出的工作。对于复杂的动态定位或者动态长度的格式化数据,还是需要接着完善XML支持的描述。


============== PD4 数据修改 XML 描述 =============
<?xml version="1.0" encoding="GB2312"?>
<FDSA>
 <Version>1.0</Version>
 <Class Name="RobotHP" Type="Struct" FixSize="0x1C4">
  <Item Name="ItemArmor3" SetValue="0x000000ff" >U4</Item>
 </Class>
 <Class Name="RoleCapabilityData" Type="Struct" FixSize="0x114">
    <Item Name="ScanRange"  SetValue="0x00400040" Ofs="0x30">U4</Item>
    <Item Name="MainArmor1" SetValue="0x00ff00ff" Ofs="0x58">U4</Item>
    <Item Name="MainArmor2" SetValue="0x00ff00ff" Ofs="0x5C">U4</Item>
    <Item Name="ItemArmor1" SetValue="0x00ff00ff" Ofs="0x70">U4</Item>
    <Item Name="ItemArmor2" SetValue="0x00ff00ff" Ofs="0x74">U4</Item>
    <Item Name="ItemArmor3" SetValue="0x00ff00ff" Ofs="0x78">U4</Item>
 </Class>
 <Class Name="PD4SaveFile" Type="Struct">
  <Item Name="RoleCapabilityArray" Count="30" Ofs="0xF2" >RoleCapabilityData</Item>
  <Item Name="RobotHPArray" Count="30" Ofs="0xD8AC" >RobotHP</Item>
 </Class>
 <FmtID Name="PD4Save" EndianType="LittleEndian" LocateType="ABS" Locator="0">PD4SaveFile</FmtID>
</FDSA>


 
Rafael @ 2009-03-18 11:04

整理程序的时候发现了反汇编分析股票程序的时候的一个副产品:一个调试器
在反汇编格式化数据处理的时候,有个办法可以帮助我们快速的定位需要的代码。没有记错的话是传说中的“数据流”分析法。
有了RTTI的技术之后,Dynamic Binding给了反汇编很多的麻烦,因为需要更多的工作量才能静态分析代码中运行的实际内容。
现在的多数Processor都有hardware breakpoint,在intel芯片中,硬件断点可以设置为数据操作触发的方式。
反汇编股票数据相关程序的时候,系统支持的文件格式有超过50多种,有点麻烦,让我决定写个调试器来跟踪从文件读取的数据的处理。
用这个程序监控了CreateFile以及C库对文件的打开,单步调试和调试寄存器的组合能逐步追溯Caller,过滤出有效的数据文件;
然后记录SetFilePointer以及ReadFile,这两个操作有时候能体现出来文件的块结构(Index+Content);
对读取的数据在调试寄存器中添加读写断点。。。
用这种运行期的数据流分析,总算是磨刀不误砍柴工,算是大大加速了反汇编的过程,跳过了太多静态分析中间的distraction的代码。
但是我记得当时写调试器好像有些逻辑和想象的出现了偏差,需要看看代码回忆一下。。。


 




 
Rafael @ 2009-03-18 10:56

总算基本整理完了写过的小程序,找到了写过的一个修改游戏存档的程序。
这个程序监控游戏的存档目录,如果发现存档变化就直接修改存档,这样不会造成任何内存修改的问题,而且也没有其他的内存游戏修改器对环境的要求。
PowerDoll4当时就是用的这个程序。


 
Rafael @ 2009-03-13 03:31

好像我呆过的所有公司都没有好下场。
第一家我走之前说要上市,我走了之后上市成功,现在已经消失了
第二家我在的时候现金流已经非常紧张,现在据老板说已经快关张了
第三家虽然有联通和石油企业合作注资,属于国资委监管,结果我以前在的部门前两天听说已经全部裁掉了
最后一家,Motorola,rumor传来说整个中国区都要关张了.....

我真的这么大的power吗?!简直就是毁人不倦的典范啊


 
Rafael @ 2009-03-12 12:56

Geo Challenge and is a facebook application with multiple graphical puzzles, most of them are challenging your memory in national flags, resorts locations and shape of countries.
Solution One: do some research on flash format and decompile it. deduce the transferred data format for answer.
Solution Two: Analyze the transferred data, deduce score update protocol or puzzle answer.
Solution Three: (Not that reasonable) use MPEG4's key contribution( object-based coding ) to isolate the overlapped objects and moving objects. Facebook "Who has the biggest brain?" also can apply this solution. But it seems to be too expensive on its costs.



 
Rafael @ 2009-03-12 12:42

转眼辞职已经快一年了,现在每天在大洋彼岸的大陆深处做家庭主男照顾老婆,日子也就这么过了,好像还是没有找到硕士或者博士想读的专业。这么长时间写的第一个程序竟然是为了玩游戏得高分,
不过想想最开始学电脑反汇编也是为了玩游戏,果然我还是我啊,好像更加颓废了...


 
Rafael @ 2009-03-12 11:42

前一段看老婆在玩Facebook上的游戏Word Challenge,一时心动就直接弄了个程序把自己弄到了最高分。
Word Challenge就是个拼单词的游戏,用已有的6个字母拼写出来尽可能多的单词。手上正好有十多年前反汇编Dos下天汇还是哪个词典时弄下
来的英中翻译词典库,用了一天的时间做了个程序来帮忙。
程序倒是不难,把词典给预处理了一下,然后给做了个字母排列组合外加查表,然后加上复数单词形式变化的判定一类的兼容处理,最后一口气
模拟键盘输入直接把按键给送过去就完了。
不过过程还是遇到不少新鲜东西的。
这游戏的词表中间俚语的词汇还蛮不少的,我那四万多词的字典还是有点不够看,懒得去加wordnet这强悍的英英语义的词典
(想加也没有那么容易,7年前只分析好了数据结构,怎么当时没有想着导出呢,这就是没有整理的坏处了。不过那东西的专业用途到也不是不是翻译,算了,忍了)了,比如dogie这词就没有
不过一直不研究做界面开发,这次才去想了下window的消息处理的层次问题,小费了点时间。



 
Rafael @ 2007-11-29 10:25

经过近两个月的分析,半个月前总算分析出来了某知名证券软件的数据存储结构,已经可以得到每一笔成交数据的细节。
每一笔成交数据包含成交时间,成交价格,成交量,买一价格,卖一价格,当天总成交量,还有一个似乎是标记外盘买卖意愿强度的指标。
现在得开始分析数据了,好难建模啊



 
Rafael @ 2006-12-28 21:46

MOTOROKR E6 has been released on Nov.