heres my last commit adding support for !mp command for the debugger
to change the protection options of a memory range of the target pid.
And adds support for gtk hack plugins that needs to be integrated with
the graphs windows and the native gui (gravala)

* Rename !regval to !get (matches !set/!get pair)
  - make the lua fuzzer scrip happy with this change
* Add support for changing memory page protection properties
  - New !mp command for the debugger
  - Stores a list of all the memory map changes done
  - Works on linux/x86 and windows (32bits)
  - Aligns memory and size to -=%4
  - Supports changing rwx permissions
* Add support for GUI hack plugins
  - Fixes some bugs in plugin list handling
  - Add gtk-hello.so example
  - Needs completely rebuild of radare (change of ABI!)
  - Initialize gtk before calling a PLUGIN_HACK_GUI one

Here's a little demo

[0xB7F328C0]> !maps
0xbfca8000 - 0xbfcbd000 rw-- 0x00015000 [stack]
0xbfca8000 - 0xbfcbd000 rw-- 0x00015000 [stack]
0xb7f4c000 - 0xb7f4e000 rw-- 0x00002000 /lib/ld-2.5.so
0xb7f32000 - 0xb7f4c000 r-x- 0x0001a000 /lib/ld-2.5.so
0xb7f31000 - 0xb7f32000 r-x- 0x00001000 [vdso]
0x0805c000 - 0x0805d000 rw-u 0x00001000 /bin/ls
0x08048000 - 0x0805c000 r-xu 0x00014000 /bin/ls
[0xB7F328C0]> !mp?
Usage: !mp [rwx] [addr] [size]
  > !mp       - lists all memory protection changes
  > !mp --- 0x8048100 4096
  > !mp rwx 0x8048100 4096
- addr and size are aligned to memory (-=%4).
[0xB7F328C0]> !mp --- 0x08048000 0x0805c000-0x08048000
[0xB7F328C0]> !cont
Segmentation fault!
=== cont: tid: 13202 signal: 11 (SIGSEGV). stop at 0xb7f34736
[0xB7F328C0]> pD 10 @ eip
     | |    0xB7F34736       eip: 8b01            mov eax, [ecx]      
     | |    0xB7F34738,           83f806          cmp eax, 0x6        
     | |    0xB7F3473B            0f84b7010000    jz dword 0xb7f348f8    [1]
[0xB7F328C0]> ? ecx
0x8048034 ; 134512692d ; 1001100064o ; 0011 0100  
[0xB7F328C0]> 


Yeah! we catch ld.so trying to read our user land!

we can do the same to walk until user code and so. !contu command will get
benefit of this too :)

I have very promising ideas for the gui plugins. so the mixture between
gtk and raw unix console is comming closer for the 1.0, I will release some
minor documentation and examples in the forum about how to write gui
plugins and interact with radare from it.

The lua scripting is becoming more flexible and powerful everyday.
I recommend you to have a look on it (scripts directory inside radare's
source).

I remember to the list that these changes are only in the 0.9.6 branch 
which is under development inside the mercurial repository.

  $ hg clone http://radare.nopcode.org/hg/radare

Enjoy!

--pancake
_______________________________________________
radare mailing list
[email protected]
http://lists.nopcode.org/listinfo.cgi/radare-nopcode.org

Reply via email to