Not all fileformats return correct data in Sections, this is
why sometimes the relocation with baddr (needed for aslr) fails
on mach0 for example. This code needs to be redesigned and fixed.
- Adds CL* and CL-* commands
- Fix invalid free
- dwarf: Use | as file line delimeter in addrinfo sdb
- Move CL to separate function and use info from sdb
- Move filter_line to a separate function
- Update analysis
- Add p2 (2bpp print command)
- Insert more auto comments for gb roms
- Delete mbc
- Handle gb-halt as cjmp (correct in most situations)
- Update gameboy register profile
- Add symbols for hard-interrupt-handlers
RCoreFile, where RBinFile contains meta information for RBinObjects. Now
RBinFiles are swapped out along with the RCoreFile when the priority is changed.
Added basic interpretation of java access flags for classes, fields, and methods
Added a visibility_str to RBinSymbol and RBinClass, and updated getters in Java
Added minstrlen to bin_java plugin struct
Fixed bin->minstrlen not being set in r_bin_init_items
Fixed iinc instruction.
1) Fixed CP Object off-by-one bug, which led too
2) Fixed the listing in consoles so now fully qualified Obj names and descriptions are right
3) Implemented byte look-ups using an array.
that were parsed will be retrieved and added to the symbols list, and
all UTF8 strings from the constant-pool items will be retrieved as strings.
- I did not attempt to retrieve strings from the byte code.
commit 109915c7812305b9a442d3a0febd9bc43f7104b5
Author: Adam Pridgen <adam.pridgen@thecoverofnight.com>
Date: Wed Sep 4 09:50:08 2013 -0500
- Added author rewrite tag
commit 5fe0d07f3a318f871bc5d6a8499afd9ceab26e33
Author: Adam Pridgen <adam.pridgen@thecoverofnight.com>
Date: Wed Sep 4 09:37:57 2013 -0500
- Added a print statement for the number of attributes in the Code Attribute
- Added a default stack frame creation
commit 4b1bca0d79c53421c1d7a9c59da070a5463ba05b
Author: Adam Pridgen <adam.pridgen@thecoverofnight.com>
Date: Wed Sep 4 08:58:55 2013 -0500
- Added the R_API prefix to all function declarations and definitions
- Removed the offset<=size from loops. Not sure why this check is failing, but it needs to be added in the future (probably add it to the list of defects.)
- Code appears to parse the classfile correctly
commit 5f5a28302da8c605800946df739c67a0f4f80b0d
Author: Adam Pridgen <adam.pridgen@thecoverofnight.com>
Date: Tue Sep 3 23:11:00 2013 -0500
- still minor bug in the parsing code on the Type Verification
or somewhere in the StackMapAttr. The right number of bytes are
being read, but not all the bytes are being consumed
commit 1c9d8b490c8d7d8592f898e019aed3b56f9406c8
Author: Adam Pridgen <adam.pridgen@thecoverofnight.com>
Date: Tue Sep 3 20:59:08 2013 -0500
- fixed some compiler warnings in class.c
commit c185248aa478c6c78f6dbe14cf65ee3396287302
Author: Adam Pridgen <adam.pridgen@thecoverofnight.com>
Date: Tue Sep 3 20:58:21 2013 -0500
- Propogated the change to code.c from changes from classes.
commit 927542a0672f37b41b23345533bc7e6f2d1a5369
Author: Adam Pridgen <adam.pridgen@thecoverofnight.com>
Date: Tue Sep 3 17:10:40 2013 -0500
Fixed some minor parsing bugs:
code_attr offet was not updated correctly after reading the length of the attribute
attr_buf was not initialized correctly before use
commit b43a7189e9934369d1fdbd96de020edcab907430
Author: Adam Pridgen <adam.pridgen@thecoverofnight.com>
Date: Tue Sep 3 16:33:36 2013 -0500
- Code compiles. Time to test.
commit ea7b332d84b88baca1abc466d02b00b2b8739bca
Author: Adam Pridgen <adam.pridgen@thecoverofnight.com>
Date: Mon Sep 2 23:55:44 2013 -0500
- Added in size calculations for the CP Objects.
- Need to add method or field references calculations for size after compiling
commit ba55375dc0e835fb46550d0063758e419ec0ed7b
Author: Adam Pridgen <adam.pridgen@thecoverofnight.com>
Date: Mon Sep 2 22:56:56 2013 -0500
- Revamped all of the attribute parsing. The parsers will handle buffers rather than simply
parsing straight from the file.
- added a size calculator for each of the attributes, which opens up the way for creating
writers for the attributes and such.
commit be6f2e038f01beeb56ace7d4daaf4d90ad3fdad7
Author: Adam Pridgen <adam.pridgen@thecoverofnight.com>
Date: Sat Aug 31 12:19:18 2013 -0500
- Cleaned up code and removed some of the compiler warnings.
commit 4c81812f2609e4a80c7036053d122306039dd6ef
Author: Adam Pridgen <adam.pridgen@thecoverofnight.com>
Date: Fri Aug 30 15:24:15 2013 -0500
- Compiler and linker errors have been resolved.
- Need to work on testing
commit 429ed30621d9abff1eec99ef50a35c57bbed76ad
Author: Adam Pridgen <adam.pridgen@thecoverofnight.com>
Date: Fri Aug 30 13:35:39 2013 -0500
Added the RunTime Annotations and Parameter annotations.
Time to start compiling and testing.
commit b6044e1c74cc10874902bd34da7c8fcbdb5713cc
Author: Adam Pridgen <adam.pridgen@thecoverofnight.com>
Date: Fri Aug 30 12:34:14 2013 -0500
Added BootstrapMethodsAttr Parsing code along with supporting stuff, like creating
the method and argument structures and mapping the REF_types to strings
More should be done to map the REF_types to specific resolutions.
Added in the MethodType, MethodHandle, and InvokeDynamic ConstantPool Objects
commit 2c9317be5d2be0608131fb9aa10f713885c89471
Author: Adam Pridgen <adam.pridgen@thecoverofnight.com>
Date: Fri Aug 30 00:21:34 2013 -0500
Finished drafting the code for annotation, element values, element value pairs,
and annotation default attribute.
TODO: RTI, RTV, and then Bootstrap attributes.
commit cbee3a10c18342f6a8fb941245568de885fe5666
Author: Adam Pridgen <adam.pridgen@thecoverofnight.com>
Date: Thu Aug 29 15:42:00 2013 -0500
Fixed the r_bin_java_element_value_new function definition.
commit ab98a76fabf2bd7764a51f3363d821c5a4cf1200
Author: Adam Pridgen <adam.pridgen@thecoverofnight.com>
Date: Thu Aug 29 15:39:28 2013 -0500
- worked out some of the initial compile errors.
- worked out an outline for parsing the element_values
- need to work through parsing the element value, freeing the element value, and then printing a summary.
commit b543d904f2aebd0d1f9c0ac8ec8401b6ab698f36
Author: Adam Pridgen <adam.pridgen@thecoverofnight.com>
Date: Thu Aug 29 08:21:33 2013 -0500
Most of the heavy lifting is done for attributes. Need to implement a few of the methods,
and then compiling should be able to happen.
Added in all attribute values to the enums, the function call tables, and then the Metas information.
Need implement an ElementValue parser bleh.
Need to implement RuntimeAnnotations, Annotations, ElementValue parsing and make sure that
the attribute unions are all updated.
commit 81f9ca2da2ed7e007a97a20ecb8eb260dfd55e7e
Author: Adam Pridgen <adam.pridgen@thecoverofnight.com>
Date: Wed Aug 28 22:33:43 2013 -0500
Finished adding some logic to handle the StackMapFrame types.
commit 9a0965cc06021ad56d2127d279b918eef613bec9
Author: Adam Pridgen <adam.pridgen@thecoverofnight.com>
Date: Wed Aug 28 17:54:52 2013 -0500
Got some of the StackMapTable Atrribute parsing working. Right now,
only the FullStackFrame will correctly parse.
commit ea12bd6a8ae9969fa05cbcab622651c8b426917a
Author: Adam Pridgen <adam.pridgen@thecoverofnight.com>
Date: Fri Aug 23 17:51:33 2013 -0500
Added some debugging code while trying to figure out how to parse the StackMapTable.
commit 6141b57ee94c7bd0569d0ea76725fdce1ac50edf
Author: Adam Pridgen <adam.pridgen@thecoverofnight.com>
Date: Fri Aug 23 17:00:12 2013 -0500
Code compiles.
commit a7ad14050eb6184a1171620c4dcdba71b2f791aa
Author: Adam Pridgen <adam.pridgen@thecoverofnight.com>
Date: Fri Aug 23 10:29:17 2013 -0500
- Added a basic Signature element
- Added declarations for the new functions to handle the parsing of the
StackMapTable related structures.
commit 54cca3d9af60463dbfa77e23ef1d562ae82d6e5a
Author: Adam Pridgen <adam.pridgen@thecoverofnight.com>
Date: Fri Aug 23 10:18:50 2013 -0500
Finished an initial coding implementation of the StackMapTable.
-- Will perform testing later in the day.
-- Need to look-up the Signature Attribute
commit a14238eece865f4d1c5f2d6b1f482b000d10d94e
Author: Adam Pridgen <adam.pridgen@thecoverofnight.com>
Date: Thu Aug 22 20:23:45 2013 -0500
StackMap stuff is wip.
commit f011a5d948d31cc6197eed1bbea497a4dde362aa
Author: Adam Pridgen <adam.pridgen@thecoverofnight.com>
Date: Thu Aug 22 18:44:23 2013 -0500
Made the globals match the R_* standard. Also tried to clean up naming stuff.
commit 6e61e15572744c2ed722ac3df8d988cc02f1316c
Author: Adam Pridgen <adam.pridgen@thecoverofnight.com>
Date: Thu Aug 22 16:40:08 2013 -0500
Plugging progress into the repo. Adding fixes to handle the Java
Class file appropriately. This modification is mostly a re-write
of the Class File parser, and it "tries" to do a better job of
creating better objects for each of the Classfile elements.
Currently this code is experimental, and current TODOs are:
1) Testing
2) StackMapTable
3) LocalVariableTypeTable
Fix some branch analysis issues for x86
Add new simpler r_reg api r_reg_getv()
Store library offset in dyldcache xtract info
Accessible via rabin2 -A or r2 <file>
Looks like dyldcache is too slow and buggy for latest caches
Fix indentation in branch comments
Add ahp (pointer hints)
Add rasm2 -c flag to select cpu (wip for arm)
rasm2 -e toggles instead of setting
Fix analysis of absolute jumps in x86-16
Push and pops are now magenta \o/
Identify Haiku binaries as 'beos' with noodle()
Fix CCa for non numeric offsets
Use sdb's r_str_hash() instead of old one (much less collisions)
Added ?h command to hash strings
CCa now appends instead of replacing comments
Do not mark as static if bin links to libs
Currently if a ICS+ extended opcode file was passed to radare2 it
would fail to parse it properly. This checks for the two conditions
'dex\n035\0' and 'dex\n036\0' - and will also just attempt to parse
it if the magic bytes 'dex\n' are available. This should suffice since
the last four bytes are the versioning bytes.
Some more work to get java support back (analysis, disasm, bin share)
Honor ordinal field in java r_bin methods
Fix segfault in 'af*' on FreeBSD (thanks idwer for reporting!)
Fix some valgrind warnings
Better io.maxblk handling
Fix div by zero when blocksize is 0
Fix disasm lines when no function and extra code comments
By default is 2, but PE which is 4
Sort rabin2 -h flags alphabetically
Add r_bin plugin-specific minimum string length
New r_list_newf() constructor which replaces the hacky R_LIST_NEW macro
Add Sa to set/get per-section arch and bits configuration
Cache io->section and core->io->section to speed up the Sa
Update r_sys_arch*
Add dummy plugin in asm/rar
Fix lines of S=
Use rabin2 -j flag to get JSON output
You can also get those jsons using the i?j command
Better awk bindings and added some examples
rabin2 -v (without any other arg) shows version
Fix some segfaults in rafind2 and use RList
Add quite output mode for rabin2 (activated with -q)
Changes in the disasm loop to support continuous fun
Fixes disasm after opcode payload
Added RConstr code in r_util (not yet used)
RBinSize implemented for elf, mach0 and plan9
Fix build
* Use '_' key in visual mode to enter in hud mode
* Support mach0 files with multiple sections with same name
* Fix parsing of commands with nested quotes
* rename ?z to ?l
* added new command ?y to get and set yank buffer contents to stdout
* ?i stores the input into the yank buffer now
* ?I accepts a file name as argument which is loaded as hud
* ?k used as key=value temporal storage
* Add calc.c .. plans are:
- support proper parenthesis in math.c
- support floating point arithmetics
- Used to autoforce io.va after loading the bin
- Fixes loading kernel modules and object files
* Fix loading strings on a object file without io.va
* Add install-rev.sh script
- Select arch/bits with r2 -a and -b (old -b is now -B)
- Kinda hacky, but works for osx-x86/32/64
- Export offset information of fat bins
* Show flags in search output
* Disable interactive console in rabin2
* Do not comment int3 opcodes
- 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
- 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
- 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
- Add r_anal_fcn_xref_{add|del} methods
* Some fixes for r_bin_dex file format
- Properly name all fields and methods
- Add entry support in java too
* Add default sections for dex and java class files
- constant pool, code, data, extra
* Beautify 'S=' command
* 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
- 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
* Fix uninitialized shstrtab segfault in r_bin_elf
* Do not create new objects unnecesarily in r_core_magic
* Handle length argument in pb command
* Fix ps command
* @@ now prefixes each line with the offset (useful for search)
- can be problematic when used with macros
> / lib
> ps @@ lib*
* Huge refactoring in r_magic, now using the r2 coding standards
- Use r_magic_new() and _free() instead of open/close
- Reduced -1KLOC
- 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
- Allow to create tiny elf binaries (only text section)
$ rabin2 -a x86_32 -c elf:31c040bb2a000000cd80 a.out
* Added api for 16 and 64 uint write in RBuffer
- Allow to create tiny binaries with r_bin
- ATM only MACH0 format for x86-32 is supported
$ ./rabin2 -a x86_32 -c mach0:31c040682a00000081ec04000000cd80 a.out
* Rename r_bin_set_arch{idx} to r_bin_select{idx}
- New API r_bin_create and r_bin_use_arch()
- Registers for which version of core was compiled
* Use tar --format=posix when GNU tar
- Fixes the dependency on BSD systems
* Fix in doc/fortunes
* Fix this class pointer in asm_java
* Re-Fix uglily the bin_elf strtab issue (needs more work)
* Fix Vala regression in r_asm.vapi
- Autodetects underlying filesystem
- Auomatically mounts a /root partition
- Only support for 'HFS+' filesystem (as a test)
* Added 'oo' command to reopen current file
- In debugger mode re-forks the process
* Fix segfaults caused by read buffer overflow in x86im
- use a 16 byte delta buffer in function and basic block analysis
* Fix r_list_delete segfault caused by an use-after-free bug
- Thanks Edd Barrett for notifying :)
* Clean up many warnings reported by OpenBSD's gcc
* Reduce analysis depth to 50
* Fix OpenBSD syscall definitions and fix generator python script
* Fix visual glitch in Vej and Vt
* Handle demangled names as comments
- in rabin2 and core->bin_load
- Needs to be a RAnalCall at some point
- bin_java calls the dummy r_bin_demangle_java
- Add R_BIN_NM_ANY enum
* Add asm.lbytes config to align disasm bytes to left
* Fix visual glitch in function boundaries
* Import upgraded versions of the idc2rdb scripts in doc/