IDA Unicode String Anylist and comment maker

早在很久之前就写过一个导入Unicode字符串注释的脚本,但是脚本操作还是有自己的局限性。每次都要通过其他的分析工具搜索定位到字符串,然后导出,在然后倒入。这是多么蛋疼的时间事情啊。 😎


(关于插图
Augusta Ada King, Countess of Lovelace (10 December 1815 – 27 November 1852), born Augusta Ada Byron, was an English writer chiefly known for her work on Charles Babbage’s early mechanical general-purpose computer, the analytical engine. Her notes on the engine include what is recognised as the first algorithm intended to be processed by a machine; thanks to this, she is sometimes considered the “World’s First Computer Programmer”
She was the only legitimate child of the poet Lord Byron (with Anne Isabella Milbanke). She had no relationship with her father, who died when she was nine. As a young adult, she took an interest in mathematics, and in particular Babbage’s work on the analytical engine. Between 1842 and 1843, she translated an article by Italian mathematician Luigi Menabrea on the engine, which she supplemented with a set of notes of her own. These notes contain what is considered the first computer programme — that is, an algorithm encoded for processing by a machine. Though Babbage’s engine has never been built, Lovelace’s notes are important in the early history of computers. She also foresaw the capability of computers to go beyond mere calculating or number-crunching while others, including Babbage himself, focused only on these capabilities.
)
到网上随便搜了搜发现hexrays曾经发布过一个处理unicode字符串的插件,猛击此处访问插件页面。插件的名字叫做unispector。并且在插件页面提供了相关的源代码下载,但是偶下载编译之后在新版的ida下无法成功加载,并且没有出现应有的效果。

Continue Reading

IDA Binary Copy & Paste


Seeing there isn’t any binary copy-and-paste functionality in IDA, this plug-in will take care of both
copy and paste operations allowing you to take a chunk of binary from one place and overwrite
another with it. You need to modify your plugins.cfg file as this is a multi-function plug-in, needing
one invocation for copy and another for paste. Obviously it only supports copying and pasting
within IDA, however it could probably be extended to go beyond that.

Continue Reading

Ida Plugin Wizard For VS2010

 
安装说明:
1.请按照提示信息进行操作,如果选择错误目录将会导致模板无法正常加载或者无法正常创建工程;
2.请确认安装目录为VS的vc根目录:如果是Win7 + vs2010则默认目录如下所示:
C:Program Files (x86)Microsoft Visual Studio 10.0VC

3.本工具的修改版本去除了插件自动复制功能,如果需要开启该功能请手工编辑
appwizIDA ProScripts1033default.js文件,去掉如下几行的注释:

否则会导致无法找到include目录或文件,或者无法生成plw文件。
4.部分错误目前尚未修正,将在未来版本进行修正。

393行 //PostBuildTool.Description = 'Copying "$(TargetFileName)" to "' + strCopyToFolder + '"...';
397行 //PostBuildTool.CommandLine = 'copy /b /y "$(TargetDir)$(TargetFileName)" "' + strCopyToFolder + '"';
Continue Reading

IDA批量模式 Python Script[fix]

#########################################
#Ida batch mode test code by obaby
#2012.03.13
#Mars Security
#http://www.h4ck.org.cn
#Email:root@h4ck.ws
#########################################
import sys
import os
import subprocess
 
# Fill these feilds with ur own ida file path and the idc file u want to execute!
idcScriptFileName = "batchmode.idc"
ida32qFilePath = '"F:\Crackl@b\Hex-Rays.IDA.Pro.Advanced.v6.1\ida61\idaq.exe"'
ida64qFilePath = "F:\Crackl@b\Hex-Rays.IDA.Pro.Advanced.v6.1\ida61\idaq64.exe"
ida32wFilePath ='"F:\Crackl@b\Hex-Rays.IDA.Pro.Advanced.v6.1\ida61\idaw.exe"'
ida64wFilePath = "F:\Crackl@b\Hex-Rays.IDA.Pro.Advanced.v6.1\ida61\idaw64.exe"
#The binary file list text 
TargetList = "F:/Python 2.6/_eric4project/idabatchmode/list.txt"
 
TargetFile_object = open(TargetList, "r").readlines()
for eachline in TargetFile_object:
    #print eachline, 
    #print eachline
    eachline = eachline.replace('\n','').replace('\r', '')
    if os.path.exists(eachline):
        tmpExecStr =  ida32wFilePath +" -A -c -S"+idcScriptFileName +" " + '"'+eachline+'"' #fixup the space in the file path
        print tmpExecStr, 
        #os.system(tmpExecStr) #singl process with cmdwindow
        #os.popen(tmpExecStr)  singl process without cmdwindow
        subprocess.Popen(tmpExecStr) #mulity process with cmd window
 
print ("All Process have been started!")

修正文件路径包含空格时找不到文件的问题,这个如果自己写的话应该是可以避免的。发现一个比较奇怪的问题,在win7下subprocess.Popen竟然不显示cmd窗口,但是在xp下显示。这是为什么? :8

IDA批量模式

整体说来ida的批量模式并不能算是真正的批量模式,只是可以通过各种手段来执行多个ida进行分析。众所周知ida是不支持多线程的,并且按照官方的说明看来在将来也不准备支持多线程。那么要想进行批量处理就只能使用自己的一些办法,自己去写个程序用命令来调用ida进行处理。

对于其他平台下的ida的批量模式这里并不准备介绍,简单的说一下Windows下的批量模式。如果用过ida的话应该比较清楚ida其实是提供了两种不同的界面,基于Gui的和基于Console的。两者都支持参数调用,但是命令行下的程序可以节省更多的资源,并且有更快的运行效率,如果同时运行数个ida那么建议使用命令行下的版本。

命令参数如下:

idag -A -Smyscript.idc input_file

官方的原始的idc脚本的内容是下面的样子:

static main()

{

RunPlugin("myplugin", 0); // run myplugin with argument 0

}

在执行脚本中调用了一个自定义的插件,那么其实这里也可以全部用脚本实现想要的功能。如果没有其他的要求可以把执行脚本锁定为analysis.idc,这个脚本会在文件分析完毕之后生成idb的数据库,并且生成相关的asm代码。需要注意的是这里的S和脚本之间没有空格,并且脚本的搜索目录为ida的安装目录下的idc文件夹,所以最好把自己的脚本放入这个文件夹下。

Continue Reading

Windows 7 Eric4 PySide环境配置

详细的配置看这里,配置好后主要是编写的ide看起来比较舒服一些。其余的没发现什么用处。而至于pyside的问题,还是和上一篇文章中提到的一样。只能在ida中使用,这个也是目前看起来比较糟糕的地方,但是比较幸运的是如果在eric中使用可以使用pyqt代替。 smile
Hello world:

import  sys  
from PyQt4.QtCore import *  
from PyQt4.QtGui import  *  
app = QApplication(sys.argv)  
label = QLabel("Hello World From PyQt4")  
label.show()  
app.exec_()  
sys.exit()