Commit Graph

269 Commits

Author SHA1 Message Date
pancake
c620b0dd3f * Fix search when io.va=true
- Add search.in = file, section, raw
* Set io.va=false rbin cant identify file type
* Show progress info in search
2011-11-19 02:49:11 +01:00
pancake
c5ca77e2dd * New commands:
- dmd and dml commands to dump/load debugger memory regions
  - Sd and Sl to dump/load debugger memory region from/to file
* Fix newline in r2 -h
2011-11-16 02:05:23 +01:00
pancake
da35ef8648 * Fix huge memory leak in r_anal_fcn_find() that was causing
r2 increase memory innecesarily when io.va=!io.va
* Add r2 -a arch -b bits
  - -b flag to specify blocksize is now -B
  - Sync manpage
* Added python test-leak program
2011-11-15 23:40:28 +01:00
pancake
cd35cf4508 * Added 'g' command to use r_egg api from RCore 2011-11-14 10:10:55 +01:00
pancake
cd96e35ec9 * Add ragg2 -e [encoder] to specify an encoder
- Added dummy 'xor' encoder. needs to be implemented
* Various fixes in libr/egg/p/*.mk -- requires make mrproper
* ragg2 -L list encoder and shellcode plugins

--HG--
rename : libr/egg/p/egg_x86_osx_binsh.c => libr/egg/p/egg_exec.c
rename : libr/egg/p/x86_osx_binsh.mk => libr/egg/p/exec.mk
2011-11-14 02:04:27 +01:00
pancake
33f045c3d6 * Add ragg2 -B to get user-defined hexpair bytes
* Use R_MEM_ALIGN() in r_egg_run() and rasc2
  - Fix execution of shellcode eggs
* r_egg plugins now support multiple architectures and operating systems
2011-11-14 01:17:13 +01:00
pancake
ac7f96bb0c * Add ragg2 -p to specify a padding
- Use the new r_egg_padding function
* Add support for continuations in rapatch2 '+' char
* Fix malloc(0) thanks to llvm's scan-build
* Fix build
2011-11-13 05:26:07 +01:00
pancake
94f905cfe0 * Do not build rasc2 anymore
* ragg2 now works better
  - Show bitsize in ragg2 -L
  - Added a sample plugin for x86-64 osx shellcode
    - command can be configured, suid can be enabled
* Minor fix in r_buf api

--HG--
rename : man/rasc2.1 => binr/rasc2/rasc2.1
2011-11-13 04:47:56 +01:00
pancake
e0fc376dab * Fix some t-*.sh scripts (rollback)
* Initial working version of shellcodes inside r_egg
  $ ragg2 -i x86.osx.binsh -b 64 -k osx -f mach064 -o a.out
  ragg2 -L : list all plugins
  ragg2 -i <shellcode-plugin> : select shellcode
  ragg2 -r : show raw bytes
  ragg2 -x : execute -- fails :(
* Use r_lib in r_egg
  - User defined shellcode plugins can now be loaded on runtime
* Fix append_bytes in r_egg api
* Implement r_egg option_{get|set}
* Use working shellcode for x86.osx.binsh example (64bit)
* Update pkgconfig templates
* Add -D flag to rasm2 (show hex and asm)

--HG--
rename : libr/egg/p/x86_osx_binsh.c => libr/egg/p/egg_x86_osx_binsh.c
2011-11-13 04:08:08 +01:00
earada
99919408e3 * Fix clean build 2011-11-12 22:36:42 +01:00
earada
ad006c9300 * Fix build
* Move libs and classes to r_core_bin_info
2011-11-12 17:15:05 +01:00
pancake
75290251da * Add initial support for plan9 binaries
- supports x86, arm, ppc, sparc, mips
* Use r_cons in r_core_bin
* Fix link of rabin2
  - Use r_cons_flush()
  - Refix ehdr issue
* r_io_size() now ignores va
* Add R_SYS_BASE
* Move r_anal_get_fcn_get into fcn.c
* Some more fixes
2011-11-12 04:51:45 +01:00
earada
4874de4569 * Refactorize rabin2 functionalities into r_core_bin_info
- r_core_bin_info shows bin data from core
- rabin2, file_load and cmd_info now uses this new api
2011-11-12 04:20:22 +01:00
earada
2fadc048e7 * RBin suport new section_end flags
* Add some filesystem automount support
2011-11-11 17:56:21 +01:00
pancake
95322945ab * Fix bug when redefining io sections
- Triggered by swapping io.va
  - Reported by @hteso
2011-11-03 23:34:18 +01:00
pancake
14f85bd76f * Import Glyn Kennington's patch for the build system
- Use absolute paths everywhere and simplify Makefiles
2011-11-03 11:49:50 +01:00
pancake
85f5829be6 * Make oxfoo1m3 crackme load correctly
- Do not find strings in binaries with no data sections
  - Add program header section underlaying the rest of sections
* Do not newline when gotoxy'ng
  - visual mode is now smarter
* New ? commands
  - ?p = show physical address
  - ?S = show section name for given address
* Initial refactoring in r_io to make section overlaps happy
  - Those changes are experimental and can lead to problems
  - Do not iterate prev
  - Do not sort by offset
2011-10-25 20:30:05 +02:00
pancake
1f7f9dc036 * Enhacements for rarun2
- add 'timeout' directive
  - directives can now be passed in arguments
  - support more than 3 args for launching
  - show default config file in help
* Added test suite for r_egg
  - Fix nested conditional and loops
  - Some situations can result in broken code
  - Code needs a huge cleanup
* Varioues fixes for x86.nz plugin to make r_egg happy
* Install python plugins into dist-packages only
  - site-packages is not the right place
* Add R2_LIBDIR and R2_PREFIX constants
* Honor LIBDIR in sdbpath for r_syscall
* Fix rabin2 -h for -C
2011-10-24 04:35:42 +02:00
pancake
37565f1ff5 * Fix shellcodes.c.src (do not use literal strings)
* Update vapis for r_asm, r_debug and r_fs
* Use anal_diff_setup() in test-ragdiff
* Sync radiff2 manpage
2011-10-20 15:05:30 +02:00
pancake
2ef1abb974 * Add -t flag to radiff2 to select code diffing match threshold 2011-10-20 02:14:35 +02:00
pancake
3b9420fad8 * More stuff to make --with-sysmagic work 2011-10-18 18:12:17 +02:00
pancake
04cbf68819 * Fix segfault in elf (thanks @earada!)
* Make cg and cgo work
* Added r_anal_diff_setup_i()
  - Fixed bindings
2011-10-16 13:59:05 +02:00
pancake
6c0318fa86 * Honor LIBDIR in syscall/d and magic/d
* Show similarity distance in radiff2 -C output
* Add -O flag to radiff2 to use diffops
* Diffing threshold for basic blocks and functions is now configurable
* Explicitly delete the asm object from the nodejs example
2011-10-14 10:09:53 +02:00
pancake
e9d1dcb4ec * Fix make w32dist
* Update manpages
* Added r2 -H for env and files help
* Add rarun2 -h
* Show assembler/disassembler features in rasm2 -L
* Add opcode 'mov dword [ebp-12],4' to x86.nz
  - Make t/test.nz work with x86.olly (32bit only atm)
* Fix unknown os issue with tiny-pe files in r_bin
* Fix some plugin names build fails in mingw32
* MAGICPATH renamed to R_MAGIC_PATH
* Add another experimental way to generate gir files
  - Added dummy test.js for nodejs
* Build python-dist in farm

--HG--
rename : man/rarc2-tool.1 => binr/old.rarc2/rarc2-tool.1
rename : man/rarc2.1 => binr/old.rarc2/rarc2.1
2011-10-12 03:24:19 +02:00
pancake
32afad2b65 * Fix build with clang
* Fix some warnings which result in more bugfixes. yay
2011-10-10 01:48:08 +02:00
pancake
a43068bde0 * brainfuck debugger is finally usable
- Added breakpoint and code analysis plugins for bf
  - *mem++ != mem[0]++
  - Full register get/set support
  - Support for step and continue-until-syscall
  - Work in progress breakpoint support
* Added bfvm_reset() hooked to plugin->kill
* Enhacements in r_core and r_debug for better debugger support
  - Added plugin->step_over delegate
2011-10-09 04:15:32 +02:00
pancake
ebb04f2e8f * Fix overflow in rasc2 (needs more work)
* Remove pragma pack(push) in x86im
* Remove analysis reference memory reads error messages
2011-07-03 01:51:20 +02:00
pancake
ce1d0e9975 * Fix sys for gmake (*BSD)
* Increase buffers in rasc2
2011-07-02 23:15:40 +02:00
pancake
bb904490dc * r2 -D now accepts a dbg.backend (dh) argument
- Fix segfault when accessing null r.file->fd->data
* Initial first working steps of the brainfuck debugger
* Add missing io.w32 plugin (untested)
  - Plugins that doesn't work on current platform are not listed
2011-10-08 12:10:30 +02:00
pancake
4ea6ee9873 * Add new flags to r2
- -D : enable debugger mode for non native debuggers
  - -c cmd : execute a command before showing prompt
* Initial import of the bfvm (brainfuck virtual machine)
* Initial dummy implementation of the brainfuck debugger plugin
  - Needs to be integrated with bfvm to work
* Added doc/brainfuck
2011-10-07 03:10:44 +02:00
pancake
508963677b * Fix linking 2011-10-06 10:09:12 +02:00
pancake
098b1ba127 * Implement input and output filters for rasm2
- Experimental.. not yet ready for release
  - Add rasm2 -F flag to specify input and output filters
   $ rasm2 -F att2intel
* Add new att2intel r_parse plugin
  - make mrproper required
* Initial implementation of RBinClass
  - Only experimental and Java-specific atm
  - Add rabin2 -C to display classes
* Optimize some r_str functions
2011-10-05 02:38:37 +02:00
pancake
3b8c1e1b32 * Add support for incremental hashing in rahash2
- Enables working with huge files
  - Use -B to per-block-hash
* Initial dummy for 'ax' command
* Add 'pdb' command
2011-09-27 10:27:13 +02:00
pancake
9884ce9db0 * Initial support for Android NDK build (fix build)
- Not yet runnable, but compiles against bionic
2011-09-25 06:57:13 +02:00
pancake
0eb0eabd19 * Do not dist w32 test bins
* rahash2 now depends on r_io
  - support for huge files is wip
* Handle offset in afl command
* Fix libs.mk syntax issue
2011-09-23 12:25:06 +02:00
pancake
0217c146ef * Fix x86.nz -> push [esp+N]
* Use pw instead of px in debugger stack view
* Disable stackptr by default
* Add OSX-32bit debugger register map
  - Fix support for debugging 32bit bins in 64bit OSes
* Implement r_egg_run() -- just in time execution
* Fix r_egg string construction and argument passing
  - Still needs more work, but at least some hello worlds work
2011-09-21 19:51:09 +02:00
pancake
1b440bf9d2 * Add ragg2 -I to prepend include path directories
* Enhacements in r_egg library
  - Add support for including files
    - bla.r@include($PATH);
  - Proper support for goto() keyword
  - Add support to get and set environment variables (need more work)
    - PATH@env(/bin);
  - Fix /* */ comment parsing code
2011-09-20 01:53:15 +02:00
pancake
279d4e6f5f * Fix make deinstall
* rarun2 and rasc2 now depend on r_util
* Add r_mem_protect() as a wrapper for mprotect/VirtualProtect
* Fix segfault in java class parser

--HG--
rename : binr/rarun2/main.c => binr/rarun2/rarun2.c
2011-09-19 13:54:57 +02:00
pancake
0a14411bc1 * Added README documentation for libr/egg programming language
* Add -O flag to ragg2 as an alias for -o a.out or -o <file> (without extension)
* Add rabin2 -M (get main) for Java Class files
* Add emit_trace (code tracer) for r_egg. useful to debug
  - ragg2 -a trace hello.r
  - Add emit->jmp() function pointer and emit->retvar
  - many fixes in function calls and definitions
  - Added support for 'break;' 'break();' and 'goto();'
  - Added .ret variable as an alias for eax, rax or r0
2011-09-19 02:39:33 +02:00
pancake
838e6b7466 * Fix java class parser for javac -g files
- Show debug information in sdb format
  - Fix null pointer segfault
  - Still work-in-progress for proper debug info
* Some work on r_egg
  - Fix windows and osx default syscall tables
* Export version number in vapi R2_VERSION
* Hide ccache error if not found in sys/install
2011-09-18 18:56:11 +02:00
pancake
096b7eb406 * Fix mingw32 build 2011-09-14 12:37:26 +02:00
pancake
2edfc3495e * Re-enable r2 -t - use threads to load big files 2011-09-14 04:31:22 +02:00
pancake
cfccb47b0f * Fix build 2011-09-11 00:42:59 +02:00
pancake
0357ddf18e * Move rapatch into r_core_rapatch (r2 -P)
- Remove r_core deps from rabin2
  - Accessible via 'wp'
* Fix build check of test program in r_db
* Pass CFLAGS/LDFLAGS to sdb build
* Add rax2 -k to not change base
2011-09-09 09:49:55 +02:00
pancake
4d6c585672 * Add support for mach0-arm and mach0-x86_64 in r_bin_create
- x86_64 has been tested and works fine, but needs some love
  - the arm mach0 (iPhone) is not yet tested, but the bin looks ok
* Install syscall sdb files into versioned directory in lib/radare2
2011-09-09 01:09:36 +02:00
pancake
62cd212ba1 * Fix non-PIC/static build (apply Glyn patches)
* Fix entropy multiplication bug (Thanks Glyn!)
* btw.. previous patch added asm.case eval var
2011-09-08 15:47:05 +02:00
pancake
4af07f8f2f * Fix linkage of rabin2 in OpenBSD 2011-09-06 17:12:45 +02:00
Nibble
ee8ca52b57 * Add decode str to ranal2 output
* Fix syscall installation
2011-09-04 17:47:26 +02:00
Nibble
0f8cc36a58 * Fix build
- Add r_db to DEPS in Makefiles
2011-09-04 11:49:32 +02:00
pancake
2c92c7d172 * Merge rapatch2 into rabin2 -p
* Honor bits in r_syscall_setup
  - Initial work on RPair in r_syscall
  - Not yet integrated, but design is mostly done
* Add r_str_split()
* Add python2 and python3 makefile rules in r2-bindings
2011-09-04 03:56:35 +02:00