Python加载的文件哪里去了?(2)

其实这个标题并不确切,其实应该是ImmDbg调试器加载的文件哪里去了。加载文件脚本还是下面的样子:

"""
(c) Mars Security. 2009-2012
Institute Of Information Serurity From Mars
Email:root@h4ck.ws
U{By obaby. http: //www.h4ck.org.cn}
"""
#sys.path.append("C:\\Program Files\\Immunity Inc\\Immunity Debugger\\Libs")

DESC="""Load Binary file test!"""

import immlib
import immutils
import os

def main(args):
    imm = immlib.Debugger()
    imm.log ("--------------------------------------------------------------------------------" )
    imm.log ("[*] Start Loading file " )
    imm.log ("--------------------------------------------------------------------------------" )
             
    rcFileHandle = open ('C:\\test.bin','rb')
    rcFileData = rcFileHandle.read()
    
    rcFileLength = len(rcFileData)
        
    imm.log ("[*] FileLength is 0x%08x and filedata is loaded at address 0x%08x" %(rcFileLength,id(rcFileData)))    

    imm.log ("[*] Finished Loading " )
    imm.log ("--------------------------------------------------------------------------------" )
        
    return "[*] Data has been Loaded!"
Continue Reading

基于ImmDbg的Python内存注射

其实上一篇文章完全是拷贝来的,目的是做个本地备份。 😀 最近开始将一些工作转移到ImmDbg,在此之前是想在OD的脚本中做一些简单的工作来实现一些内存数据的修改以及写入功能,但是事实上由于OD脚本的API函数有限,要实现诸如文件读取之类的工作发现基本没什么可能,当然了也有可能是因为自己孤陋寡闻, :8 如果谁知道相关的APi还望不吝赐教。 smile

Continue Reading

Starting to write Immunity Debugger PyCommands : my cheatsheet 『Rw』

When I started Win32 exploit development many years ago, my preferred debugger at the time was WinDbg (and some Olly). While Windbg is a great and fast debugger, I quickly figured out that some additional/external tools were required to improve my exploit development experience.

Despite the fact that the command line oriented approach in windbg has many advantages, it appeared not the best tool to search for good jump addresses, or to list non-safeseh compiled / non-aslr aware modules, etc….  Ok, looking for a simple “jmp esp” is trivial, but what if you are looking for all pop pop ret combinations in non-safeseh compiled modules…   Not an easy task.

It is perfectly possible to build plugins for Windbg, but the ones that I have found (MSEC, byakugan (Metasploit)) don’t always work the way I want them to work, and would still not solve some issues I was having while writing exploits.

OllyDbg and Immunity Debugger are quite different than windbg.  Not only the GUI is very much different, the number of plugins for these debuggers is substantially higher.  After evaluating both of them (they pretty much have the same look and feel), and evaluating the way plugins can be added, I made the decision to focus on Immunity Debugger.

That does not mean OllyDbg is a bad debugger or is limited in what you can do in terms of writing plugins… I just found it harder to “quickly tweak a plugin” while building an exploit.   OllyDbg plugins are compiled into dll’s, so changing a plugin would require me to recompile and test.   Immunity Debugger uses python scripts.  I can go into the script, make a little change, and see the results right away.  Simple.

Continue Reading

Nexus 7 root

Nexus 7如收到现在也不过区区的24个多小时。使用的整体感觉还是非常流畅的,用单手持设备也刚刚好。但是整体的屏幕自然比iPad要小一些,虽然屏幕小但是日常的阅读和游戏已经绰绰有余了。在使用中也发现了一些问题,很多的应用现在不兼容4.1.1.8G的容量多少还是笑了一些,虽然可以使用OTG功能扩展,但是即使扩展上个U盘携带起来还是很蛋疼。像这种设备毕竟是带着跑的,但是带着跑还要带个数据线,带个U盘就变得非常的蛋疼。

本文的主要目的是root,首先需要说明一点,在root的过程中设备上的所有数据都会被抹掉包括图片,音乐,视频,程序等等,所以在root之前最好备份自己的设备数据。Nexus的root比i9100G的root要麻烦一些。

root需要四步:
1. Install ADB/Fastboot drivers
2. unlock bootloader
3. Install ClockworkMod Recovery
4. Install supersu.apk。

Continue Reading

开源是一种态度

对于开源我并没有什么太高深的理解,只是这两天的事情给我的一些启发而已。在这里简单的表述一下,首先要明确的第一件事情是开源不代表免费,也不代表你拥有代码的全部处置权。这里我不想对于对待的所有的权利进行说明,也不想讨论权利的问题。只是从开源代码的生命周期来看。

其实自从去年开始处理IDA的各种插件开始,接触到很多非常不错的插件,但是很多的插件都是停留在5.0-5.5的状态,并且很多的插件没有提供源代码。像这种插件就只能任由他死去。而对于另外一些开放源代码的插件则可以通过简单的sdk的修正和一些简单的修复就可以重新编译出来支持IDA Pro 6.x以上的版本。而这一些使得代码能够有更长远的生命,也能够让更多的人用到这个东西。于是在无形中代码就变得更加长命。而由于多年以前代码的托管并不是十分方便,于是很多的代码并没有托管到第三方的开源代码服务器上,只能下载到压缩包。

Continue Reading