加密与解密第三章:IDA的基本操作
2018-07-10 00:45
555 查看
IDA编辑二进制代码
edit->patch program参考:https://blog.csdn.net/hgy413/article/details/50650232
IDA打开应用程序时,会为其创建一个数据库,后缀为IDB。IDB由4个文件组成:
后缀为id0的二叉树形式的数据库,后缀为id1的程序字节标识,
后缀为nam的Named窗口的索引信息,
后缀为til的给定数据库的本地类型定义的相关信息。
更改数据为结构体和枚举类型
查看输入和输出的idc脚本
#include <idc.idc> static GetImportSeg() { auto ea, next, name; ea = FirstSeg(); next = ea; while ( (next = NextSeg(next)) != -1) { name = SegName(next); if ( substr( name, 0, 6 ) == ".idata" ) break; } return next; } static main() { auto BytePtr, EndImports; BytePtr = SegStart( GetImportSeg() ); EndImports = SegEnd( BytePtr ); Message(" \n" + "Parsing Import Table...\n"); while ( BytePtr < EndImports ) { if (LineA(BytePtr, 1) != "") Message("\n" + "____" + LineA(BytePtr,1) + "____" + "\n"); Message(Name(BytePtr) + "\n"); BytePtr = NextAddr(BytePtr); } Message("\n" + "Import Table Parsing Complete\n"); }
//exports.idc //(c) www.PEDIY.com 2000-2008 #include <idc.idc> static main() { auto x, ord, ea; Message("\n Program Entry Points: \n \n"); for ( x=0; x<= GetEntryPointQty(); x = x+1){ //GetEntryPointQty()得到入口点个数 ord = GetEntryOrdinal( x ); //得到该入口点的序列数 ea = GetEntryPoint( ord ); Message( Name( ea ) + ": Ordinal " + ltoa( ord,16 ) + " at offset " + ltoa( ea, 16) + "\n"); } Message("\n" + "Export Parsing Complete\n"); }
解密self modify code
idc文件如下://encrypted.idc //(c) www.PEDIY.com 2000-2008 #include <idc.idc> static decrypt(from, size, key ) { auto i, x; for ( i=0; i < size; i=i+1 ) { x = Byte(from); x = (x^key); PatchByte(from,x); from = from + 1; } } static main() { decrypt(0x00401060,0x15,0x1); }
如果遇到ida未识别十六进制数据,直接强转为代码即可。
FLIRT
能使IDA能在一系列编译器的标准库里自动找出调用的函数用法打开如下 signatures
导入我们想加载的库的签名文件
之后函数就出来了
相关文章推荐
- Java使用基本JDK操作ZIP文件以及zip文件的加密、解密等功能
- 用C#实现字符串的加密解密操作
- Java-web中利用RSA进行加密解密操作的方法示例
- linux基本命令及操作14(磁盘加密、RAID、lvm)
- Java-web下使用RSA进行加密解密操作
- C# 密码加密解密操作相关类
- 加密、解密、openssl的基本应用以及CA的实现过程
- 使用AES算法对文件进行加密/解密的操作(JAVA)
- openssl的加密/解密等基本应用以及利用openssl实现私有CA
- 加密、解密、openssl的基本应用 及CA的实现过程
- Win 8 加密解密操作,运行时保存值(Session)
- Python之数据加密与解密及相关操作(hashlib、hmac、random、base64、pycrypto)
- 学习opencv第三章 基本数据类型 ,矩阵创建,操作,访问
- 文件操作-按行加密解密
- 利用Base64对文本进行加密解密操作
- 1.IDA-基本操作(改变Image Base地址、打开、保存IDA的不同方式)
- Android 对Android客户端与服务端传递的Json数据进行加密、解密操作
- HTTPS加密解密的基本过程
- 对文件进行简单加密和解密操作
- 北电ERS1600,8300,8600交换机的基本技术- 第三章: 接口操作