Commit Graph

159 Commits

Author SHA1 Message Date
Simone Ferrini
283c2796d1 [bin_mach0] added NULL check to fix a segmentation fault (#7846) 2017-07-01 15:00:17 +02:00
Giovanni
72b643654d iCj - Signatures in JSON format 2017-05-09 14:43:07 +02:00
Álvaro Felipe Melchor
825caa96bc Fix #6955 - get rid of .check in RBinPlugin and RBinXtrPlugin 2017-04-13 11:54:28 +02:00
pancake
fb47d2ce74 Initial implementation of extracting class info from symbols 2017-04-10 12:52:42 +02:00
alvarofe
80d428ba1b Fix memory leak in mach 2017-03-23 15:28:19 +01:00
pancake
35f0eed71a Enhance stripped detection on MACH0 binaries (thanks @dan1t0 for reporting) 2017-03-23 14:52:39 +01:00
pancake
56aeb2a6e3 RBinPlugin.load boolified 2017-03-17 03:52:43 +01:00
pancake
6a9c4a652c Refactor get_sdb(RBinObject) -> get_sdb(RBinFile) + r2-indent 2017-03-15 00:21:37 +01:00
pancake
1a5dbf3ccb Boolify rbin's check + check_bytes callbacks and fix null deref in dex 2017-03-08 23:16:46 +01:00
Q
b7db017fa5 Fix multiple definition error in static builds (#6891)
Rename conflicting global names 'fields' array in AArch64
and 'fields' function in MachoO
2017-03-03 10:53:41 +01:00
pancake
0eadd79d5a Implement initial iHH for mach0 2017-02-24 02:33:50 +01:00
alvarofe
e3da109030 Added support for nx in mach 2017-02-22 23:15:22 +01:00
alvarofe
27eedfdabd Fix again arm/thumb symbols on mach binaries 2017-02-19 20:09:02 +01:00
alvarofe
5d94b57394 Fix #6763 - calculate correctly arm/thumb symbols 2017-02-16 22:18:20 +01:00
pancake
54176fb2c0 Update spp and build it with -fPIC 2017-02-11 12:50:38 +01:00
pancake
4e2cd40ed6 Implement bin.verbose for ELF, PE and MACH0 2017-01-22 01:50:41 +01:00
pancake
82af8f0d03 Meta relocs as data (dword or qword) 2017-01-04 01:26:29 +01:00
pancake
12631d40dd Include segname in section name for mach0, enhance S= 2016-12-24 01:24:59 +01:00
Francesco Tamagni
183fcb2107 Fix (not so) tiny macho creation (#6317)
* Fix tiny macho-32 creation
- add empty linkedit with empty symtab and dysymtab segments
- text segment should span the whole file
- fix main entry point
- fix load_dylib command format
* Fix tiny macho-64 creation
- mostly a port from 32-bit case
- except here we need a WRITABLE segment to make dyld happy
- i choose to make the __LINKEDIT segment WRITABLE (it's zero-sized after all)
2016-12-14 00:22:55 +01:00
Álvaro Felipe Melchor
7edd787373 remove check in bin_mach0 already handled by fcn 2016-12-07 13:37:53 +01:00
Álvaro Felipe Melchor
940c9a9bf1 handle more data sections in objc mach files 2016-12-07 13:09:08 +01:00
Álvaro Felipe Melchor
028e8f0ca3 Fix few covs 2016-12-04 22:26:17 +01:00
Álvaro Felipe Melchor
fc6000a8be Fix regression in fatmach0
$ r2 -a arm -b 64 mfan
Not enough data for SClassRoT
Not enough data for SClassRoT

mach0_classes.c handle the buffer of the mach instead of the whole
fatmach file. Thus we should revert physical addresses by obj->boffset on
sections.
2016-12-02 17:46:48 +01:00
Álvaro Felipe Melchor
35eb178c8b do not realign haddr in thumb mach0 2016-12-02 16:22:18 +01:00
Álvaro Felipe Melchor
4f8dcb3218 realign entry and set anal hints in arm mach0 2016-12-02 13:48:56 +01:00
Álvaro Felipe Melchor
87724384d1 added r_cons_break_{push/pop} to handle ^C better
Besides an UAF has been fixed afecting only ELF
2016-11-21 16:56:12 +01:00
Marc
c4428f088d Haddr entrypoints for ELF, PE and mach0 (#6167) 2016-11-13 23:34:45 +01:00
pancake
8ecb580aa7 Add dylinker and libsystem for rabin2 -C mach0, still not working 2016-11-07 01:56:25 +01:00
pancake
8cd6077600 Fix filesize for mach0 in rabin2 -C 2016-10-28 01:04:25 +02:00
pancake
f95744b9a1 Implement LC_MAIN and PAGEZERO in rabin2 -C mach0 2016-10-27 22:53:01 +02:00
Álvaro Felipe Melchor
a2befc8adc Enhance performance in r_anal_fcn_get_in() using tinyrange and sorted adds
* added sorted parameter in r_list
* use r_list_sort in r_range_sort
* some clean up
* added is_data into RBinSection
* use tinyrange by default to improve speed
2016-10-25 01:12:06 +02:00
Álvaro Felipe Melchor
19a633ff77 Fix signature from mach0 2016-09-26 00:40:54 +02:00
pancake
e228e430e0 Add support for cfstrings and fix arm64 ADR analop for more refs 2016-09-20 00:43:06 +02:00
pancake
059ad1a51c Differentiate methods from functions in objc parser 2016-08-09 01:40:12 +02:00
Álvaro Felipe Melchor
32335f7635 fix regression 2016-08-07 19:16:02 +02:00
Rakholiya Jenish
339a5b7b18 fix iZ and negative o for large files (#5242)
correct the add section check

keep commented part to it's original code

int to ut64

minor fix and limit buffer size in case file size cannot be allocted

remove section check

show size in readable format

minor changes
2016-07-05 12:46:28 +02:00
pancake
eb9feef231 Fixes for powerpc endian in mach0 and other issues 2016-06-06 22:57:22 +02:00
Álvaro Felipe Melchor
b7cc6c04d7 LDID parse signature in mach0 binaries
* added iC command to show signature info

in the case of mach it shows entitlements

* added rabin2 -OC to get signature info from binary

* change swap to r_read_bleX new API

* change eprintf to r_cons_printf

* add const char in plg->signature
2016-05-09 23:42:28 +02:00
pancake
5867365cd5 Add dummy work for mach0 in rabin2 -O 2016-04-07 15:42:06 +02:00
pancake
02abba69f1 Fix #4253 - 1 byte oob read in mach0 2016-03-07 13:23:01 +01:00
pancake
3140749266 Fix #4095 - Export RBinSection info for mach0.la_symbol_ptr 2016-02-16 02:58:29 +01:00
alvaro_fe
a6e4d6b93e Fix #838 2015-12-16 11:40:23 +01:00
pancake
25ec4623b4 Fix 3757ca.. objc mach0 crash from @revskills 2015-11-22 23:08:53 +01:00
pancake
88038a85ad Fix some RBinSymbol->name issues and drop null defs (-211LOC) 2015-11-22 01:09:02 +01:00
pancake
45de9bc433 Shrink Imports and Strings RBin memory footprint 2015-11-09 04:41:31 +01:00
pancake
baf63a0cba Reduce RBinSymbols memory (smaller footpronum) 2015-11-09 03:41:07 +01:00
pancake
1b88200e31 Add support for 'interpreter' in RBin, ELF and MACH0 2015-10-22 02:13:26 +02:00
condret
c39f33bc77 fix a -Wunused warning 2015-10-22 00:40:29 +00:00
pancake
366ba23b30 Fix ab88f42f9b mach0 crash (reported by @revskills) 2015-10-21 23:46:41 +02:00
Álvaro Felipe Melchor
748564683e Fix #3518 2015-10-20 23:52:34 +02:00