Radare2 Versions Save

UNIX-like reverse engineering framework and command-line toolset

5.4.0

2 years ago

Release Notes

Version: 5.4.0 Previous: 5.3.1 Commits: 258 Contributors: 20

Highlights

  • Add the vector35 arm64 for analysis, esil and disasm and r2 can be built without capstone
  • Improved integration to use r2ghidra analysis and disassemble mainly tested for avr, v850 and arm64
  • Fix emulation of several x86 and arm64 instructions, including an scripted way to import official arm64 instruction descriptions
  • Bring back the cmd.pin to instrument the esil emulation when a specific address is hit
  • Small steps towards Projects with improved management for version control
  • Improved visual and panels with better interactions and fixed glitches

Shell

  • 500 more commands are now listed in the recursive help command: ?*
  • Backslash is now completely gone. Please use ':' or the original '=!' instead.
  • Implement @@== foreach word iterator operator
  • Add mwf command to write local files into remote targets
  • wv1,2,4,8 accept many space-separated numbers now

Search

  • New /c subcommands are now available for searching crypto stuff
  • To find references to the UDS CAN table use /ru
  • Find PGP and RSA encrypted keys in memory with /cg
  • Search for common hashing and crypto constant tables in /ck
  • Add /ab to find backward jumps (mostly loops) and handle ^C
  • Initial implementation of spp, snp, /bp and /pp to find next/prev preludes

Analysis

  • Improved VAX analysis, disassembly and analysis
  • Esil function emulation is performed properly spotting many more xrefs and reduces falses positives.
  • Default aa, aaa and aaaa analysis commands are now faster and produce better results
  • Analysis plugins can be now used as a replacement for the asm ones only for disassembling. Next release will start removing unnecessary asm plugins, reducing compile times and build size.
  • The new 'wan' command nops the partial instructions left, making binary patching much simpler
  • Faster exit times for ^D, making interactions more fluent and reducing CI times
  • Initial implementatil of ESIL macros and start reducing the instruction set
  • Better x86.pseudo and varsub for strings

Debugger

  • Signal handling is now displayed in human form and C with better stop reasons
  • Use DRX APIs to handle breakpoint recoils only on x86-64

Signatures

  • Support FLIRT v5 file format compression
  • Fix bug in zaf creating zignspace
  • Expand r_sign API and major refactor

New platforms:

The build system and CI packaging has been improved quite a lot, simplifying the release process and testing.

  • serenityOS: unix based OS that looks like w95, with its own kernel, libraries and userland. Debugger support in r2 is not yet available for SerenityOS, but APIs are there, so it's just a matter of getting it
  • Vinix: Kernel completely written in V, able to run bash, gcc or python, is now able to run r2!
  • Vax/netbsd: after discovering SIMH, a Vax emulator, took me few minutes to run NetBSD and run r2 in there, no debugger support yet.
  • WebAssembly is now build and published in the CI
  • Tic80: For now it's just identifying and parsing the headers and placing the flags

Windows

  • Building on windows is as easy as running: preconfigure, configure and make
  • That will detect VS, Python, Git and setup the PATH and install Meson and Ninja for you.
  • Resolve Windows APIs at runtime to fix build with mingw and improve backward compat
More details

Authors

Alex Bender Apkunpacker Azox Davide Pizzolotto Dennis Goodlett Enshin Andrey Ilya Trukhanov László Vaskó Maijin Murphy Paul I RHL120 Royos90 Sylvain Pelissier aemmitt-ns gogo hot3eed lasek0 pancake pancake

Changes

anal

  • Properly stringify the RAnalOP.type field
  • Implement aaff command and improve aaf? help message
    • Extend afj command to handle all jump table parameter options
  • Implement 'afs*' command to export function signature info in r2 commands
  • Fix afsj, taking signature args instead of fcnargs in json
  • Initial import of the arm64v35 disassembler and analysis plugins
  • Optimize infinite loop on non-quantum computers
  • Avoid assert on avr's null cmpreg test
  • Finish the tolowering of anal.noNULL
  • Fix aef and aaef to actually find xrefs at least

asm

  • Fix #18813 - Cannot assemble cmp w26, 0 in arm64
  • Fix #18876 - Check imm bounds for some instructions in the x86.nz assembler
  • Add pushf/popf instructions to x86.nz
  • Use RAnalBind in RAsm to reuse RAnalPlugins to disassemble
  • Update ARM64 arm.sdb.txt opcode descriptions from documentation
  • Update the VAX disassembler from binutils

assembler

  • Fix #18872 - New command 'wan' to write and nop affected instructions

bin

  • Fix #18783 - Support ELFs with phnum > 0xFFFF
  • Allow RBinPlugins to use RBinFile at check()
  • Initial support for the TIC-80 Fantasy Computer cartridges
  • Replace SDB with HtPU in RBin.filter_name()
  • Put archinfo.{minopsz,maxopsz,align} in the output of i
  • Implement ELF relocs for VAX

build

  • Add portability support for Vinix
  • Add meson support for the anal.arm.v35 plugin
  • Add preconfigure/configure/make batch scripts for Windows
  • Initial import of ./preconfigure for packaging purposes
  • Improve the macOS packaging scripts
  • Import radare2-win-installer files into dist/windows
  • Fix meson build and proper use of cgen
  • Fix system() on arm64 macOS targets (#18877)
  • Initial support for capstone-less compilations
  • Build and publish the ZIP with the WASI bins
  • Add initial support for building r2 on WASI

ci

  • Version the artifacts

cons

  • Dont check out of bounds last chars
  • Honor faster ^D on interactive execution path
  • Fix arrow handling after fixing mouse clicking glitches

core

  • Honor bool in io.va, scr.interactive, scr.prompt and cfg.fortunes
  • Optimize and improve r_name_filter calls
  • Add &w command to wait and run for queued commands
  • Implement &: for queue commands
  • Implement @@== foreach word iterator operator

debug

  • Fix the windows debugger and make it more stable
  • Add tests for the improved signal handling messages
  • Change the way wait events are handled in the unix-debug backend
  • Add 'sigstr' to the 'di' output for verboser stop reasons
  • Add RSignal.toHuman() and improve RDebugReason.toString()
  • Use DRX APIs to handle breakpoint recoils only on x86-64

disasm

  • Support arch.* namings for the parse plugins
  • Better x86.pseudo and varsub for strings
  • Fix r_str_ansi_len() causing unaligned 'unaligned' words
  • Improve invalid address and string parameter issues in emu.str and pd comments
  • Improve x86.parse for asm.pseudo

esil

  • Fix emulation for AARCH64 ldr,str,stp,ldp instructions
  • Fix #18860 - mul and imul for *dx operands and 64 bit widths
  • Bring back pins to esil land
  • Fix POPF POPFD POPFQ not increasing stack pointer
  • Add wide and math instr esil for dalvik, pac esil for arm64
  • Initial implementatil of ESIL macros

fs

  • Add mwf command to write local files into remote targets

io

  • io.plugin.lseek -> .seek for portability (wasi related) (#18840)

panels

  • Add xX key descriptions in the help message

print

  • Improve the pdc output to allow recompilation
  • Initial implementation of the pdo esil2c output

projects

  • Dont save projects when no project is used
  • Exclude files of nested rvc repos from repo_files()
  • Use r_sys_whoami as the author name for r_vc_commit
  • rvc add r_vc_find_rp
  • Rework r_vc_checkout and fix some mem leaks
  • Rework the rvc_commit functions
  • Take advantage of prj.vc.type and merge rvc & git
  • Fix r_vc_commit and other functions
  • Major rvc api refactor to use sdb

rvc

  • Fix memory leak and infinite loop in r_vc_find_rp

search

  • Implement /ck command to search for crypto constant tables
  • Rename /cu UDS CAN table search to /ru command
  • Add PGP search for signature and RSA encrypted private keys (#18961)
  • Add /cg command to search for GPG artifacts
  • Update tests and add /a[?]q for quiet-legacy mode
  • Use pdi in /ad output
  • Initial implementation of spp, snp, /bp and /pp to find next/prev preludes
  • Add /ab to find backward jumps (mostly loops) and handle ^C

shell

  • Autocomplete :. command
  • wv1,2,4,8 accept many space-separated numbers now
  • Remove other useless and incomplete treesitter leftovers and get +400 new commands in the recursive help
  • Remove colons in "?" number conversion output
  • Honor < and > comparison operators in RNumMath
  • Use RNum.math in "?b" to make '?b 1<<1' work
  • Add scr.hist.filter to toggle the filtered history up/down search
  • Improved reverse-search in command history
  • Faster ^D (leave r2 without freeing the core)
  • Completely eliminate the deprecated backslash command
  • Add some help and better parsing for the anal hints

signatures

  • Add r_sign_metric_search to r_sign.h
  • Fix bug in zaf creating zignspace
  • Expand r_sign API
    • Use r_sign in rasign2
  • Support FLIRT v5 file format compression

tools

  • Rename rvc2 to ravc2 to follow the ra*2 pattern
  • Add rasm2 -LL to list anal plugins loaded

vc

  • Integrate rvc in projects and add a default commit message

visual

  • Add context in visual xrefs
  • Fix #18843 - Implement Vx[+-] to add/delete xrefs
  • Fix glitches when clicking in the hud
  • Fix asm.hint.imm keystrokes ignored
  • Fix #18292 - Clarify the use of Vdn/Vdr and rename VdR to VdX
  • Handle 'o' key for options in panels
  • Initial implementation of ~.... for hudline prompt
  • Add Vi+ Vi- keys for visual insert byte inc/dec
  • Add Vi: keystroke to run commands on insert mode

windows

  • Use dynamic api resolution on windows builds for better portability

5.3.1

2 years ago
  • Assembling invalid arm64 instructions dont result in invalid representations
  • Add http.basepath to support sub directory handling for proxying purposes
  • Support instruction descriptions when using the r2ghidra disassembler plugin
  • Fix issues and enable the garbage collector when running @vlang scripts
  • Fix arm16 ldr post indexing esil expression
  • Fix r2pipe regression caused by a change in RCons buffering when chaining multpile commands
  • Support user defined REgg plugins
  • CI: Fix macOS builds and build debian packages on ubuntu18 instead of ubuntu20
  • Fix prj.vc issue on Windows
  • Add support for armhf/armv7 musl builds as well
  • Enable build on less capable systems disabling threads, pty and other platform functionalities separately
  • Fix sorting issues on RList and foreach_prev

5.3.0

2 years ago

This release comes with a large list of bug fixes contained in 246 commits from the last 6 weeks thanks to 19 contributors. Kudos to everyone hanging out in the chats, testing, discussing, asking, helping and building up this community that makes r2 what it is. Hope all the users appreciate and enjoy this update as much as we did coding for it.

Greetings to: Alex Bender Anthoine Bourgeois condret David CARLIER Dennis Goodlett Giovanni Di Santi gogo2464 Jing Liu meme Michal Ambroz murphy pancake Rene Laemmert RHL120 Shadorain Siguza Simon Vareille StefanBruens Sylvain Pelissier

I could shout: aaaa is no longer breaking the debugged process! or Go scripting support!, but the list of changes and security bug fixes is quite large to summarize in just one line.

Some important bugs has been fixed in the build system, not just reflected in the README and the CI but also for both meson and acr, previous old installations of r2 no longer breaks the build. The rpath builds are now fixed for both acr and meson, this is required for r2env! also, and most important one, all the sdb databases are now precompiled in C and loaded at compile time instead of having to map disk files. This fixes the need to depend on side files installed in the system to make your static binary builds of r2 to work. This feature is now enabled by default and tested in the CI, but it can be also optionally disabled if you prefer the old behaviour which is more flexible. musl static builds are now officially supported and tested in the CI.

Friendly reminder that license documentation has been updated in doc/license.md and you can check at runtime all the licenses of the core and plugins used in your builds of r2 in case you need to care of such things.

Support for the S390 architecture and the z/OS architecture has been improved from RBin, RCharset and RAsm by adding support to extract ebcdic37 strings with rabin2 honoring cfg.charset and loading MVS OFF S/390 module objects, in addition, the latest S390 disassembler from GNU Binutils has been imported, which works side by side with the Capstone one.

Some important bugs has been fixed in the debugger. From infinite loops, fixed reg profile for arm64 debuggers, reseting the heap analysis on restart and other undefined behaviours that happened randomly on Linux and macOS. We greatly recommend you to update!

Multiline comments are better displayed on hexdumps and disasm, the order of flags and xrefs is now sorted to be more meaningful to the reader. The variable asm.sub.jmp is now working again. Other improvements with asm.meta=false for displaying data in the middle of code and better displaying of switch table comments. A new variable asm.hint.imm is now accessible from visual mode to pick immediates from instructions using hot keys. All those additions make visual and panels look even better!

The commandline have received some bold updates. The newshell parser has been removed from the codebase, which resulted in the following changes: improved commandline parser to fix all the tests working in newshell with the good-old-C-based parser, deprecate the backslash and single quote aliases for =! and promote the use of :. This is an important change for r2frida users!. The autocompletion tab is working again and has been extended to support more config var types. The whole refactoring end up with 30s less in CI builds and 512KB less sources.

New commands!

  • afxm : x/y map of function xrefs
  • wcf : write file contents + cache patches into given file
  • aev : the visual esil debugger (same as VbE)
  • aeis: initialize stack for given argc, argv, envp
  • x/w : long standing issue improves gdb-like examine commands in r2
  • ===stderr : allows to redirect r2's stderr thru the new r2pipe.side api
  • px-- context hexdump command (like pd--)
  • : this always-undefined command is now replacing \ and ' aliases

Command changes:

  • px now honors cfg.charset in the ascii column
  • pr : supports printing raw null bytes
  • Mark ' and \ commands as deprecated. use :
  • Implement @@@e and @@@E to iterate over entries and exports

The RBin library ships with some important security bug fixes, covering some public CVEs for corrupted PE, Python and MACHO files. Additionally a cache has been added to greatly speedup the loading of DWARF files and adding support for two new file formats (OFF for zOS/S390 and WAD (the DOOM map files).

From the analysis perspective this release comes with some important changes: capstone5 is now the default disassembler and analysis library for most common architectures. The anal.calls variable is now honored in aa, which results in better code coverage when performing automatic analysis. Running aaaa no longer breaks the debugged process! There's some little improvements in the type propagation analysis and the missing char** type is now included, which works in sync with the new aeis command to redefine the stack contents for a specific argc, argv, envp.

ESIL has deprecated the REPEAT keyword and extended the Thumb emulation by supporting the ldrd instruction, The arm64 assembler has been also improved a little bit warming engines for the r2wars. Non-intel users will also enjoy a more native experience along all the tools because.

A new IO plugin is available in default builds, the socket://, this plugin was implemented in r1.. but it never really reached r2 codebase until now! This plugin connects or listens to a tcp host:port and records a flag for every read operation that happens, writes are sent to the endpoint, this enables r2 to be used for protocol debugging, which can be easily scriptable with r2pipe for fuzzing or testing purposes. The old tcp plugin is now named tcp-slurp:// to avoid confussions.

Signature search, matching, storing and management has been improved, handling collisions of multiple metrics to better decide which match pick, bytes are now available as a metric for signature matching, diffing and comparison. This makes z/ run quiet faster and generate better results than before.

Better error messaging has been added in visual, panels as well in many commands like the infamous pf which use to spit confusing messages, now supports writing enums and bitfield values in mapped structs. Same goes for the pa command which now suggests pd in case the user mistypes it (as it seems to be from the feedback from users).

Summarized Highlights

  • removed newshell improved oldshell
  • switch to capstone5 and honor anal.calls for better code coverage and type propagation
  • initial support for analyzing s390/zOS module objects
  • \ and ' aliases are now deprecated. Use =! or : from now on.
  • Improved ESIL with visual word level esil debugger for Thumb, arm64 and x86-64
  • Import socket:// from r1 for tcp network protocol debugging
  • Type information from the binary is now loaded by default
  • Improved stability of analysis and debugger on linux-arm64
  • Musl static bins with compiletime databases for better portability
  • Custom charset supported to find strings and hexdump ascii column
  • Disassembly listing improved for multiline comments and multiflag offsets
Changelog Highlights

Changes

anal

  • Improve aaaa log messages and avoid aaef to run in debugger mode
  • Fix many zero cases in some jump table analysis
  • Fix disasm alignment of data words in s390x disassembler plugins
  • Fix s390.gnu disassembly and add test for 6 byte instructions
    • Better debug messages instead of r_warn in jmptbl analysis
  • Better debug messages instead of r_warn in jmptbl analysis
  • Use gperf on anal/d and improve build and checks
  • Implement afxm command to show an call refs map
  • Apply fix in sixref plugin to be in sync with the latest xref
  • Type added: "char**" to SDB, ref #18633 (#18636)
  • Fix boundary check in aao to parse more refs
  • Fix 'Cannot find return type for' calling convention issues when saving a project (#18638)
  • Fix 13482 - Remove anal.jmp.after variable (#18629)
  • Improved type propagation analysis
  • Fix #18323 - honor anal.calls in aa

asm

  • Fix #18619 - Wrong assembly generated for: "add x0, x0, 1, lsl #12" (ARM64)
  • Fix rasm2 -w in termux (honor R_SYS_ARCH)
  • Fix rasm2 -w in termux (honor R_SYS_ARCH)
  • Handle je and jne as aliases for jz and jnz in wao
  • Rename sysz to s390 and add the s390.gnu plugin from binutils 2.36
  • Update sdb and use of SdbGperf in asm.d
  • Switch to Capstone5 as default

bin

  • Dont trust the unaligned rich PEs
  • Add initial toy IBM S390 Object File Format parser
  • Fix #18724 - Use RCharset in rabin2 -z
  • Always load bin types as pf. format strings
  • Add WAD file parsing (#18659)
  • Fix #18679 - UAF when parsing corrupted pyc files
  • Fix #18667 - division by zero in the macho parser
  • Speedup dwarf loading when no files are found in disk

build

  • Fix #12335 - ignore system-installed r2 includes
  • Add use_cgen meson option
  • Add support for acr/musl-gcc static builds
  • Improve the xxhash system library detection
  • Make meson compatible with older versions (RHEL8 meson 0.49) (#18684)
  • Fix --with-rpath and add CI tests (#18668)
  • Collapse all opcode_*.c files into opcode_all.c

charset

  • Implement IBM EBCDIC 0037 character encoding

cons

  • Fix grep cmd with neg (#18763)

debug

  • Add missing =SN and zf for the darwin-arm64 native debugger reg profile
  • Fix infinite loop in r2 -c 'ood;ood' -
  • Fix dmha output after ood (#18710)
  • Fix cast issue in ptrace call, waitpid fix
  • Show string version of the stop reason in di

diff

  • Add byte signature diff zd

disasm

  • Fix #18427 - Sort flags by [sections,formats][other][regs]
  • Fix multiline comments in 'pd' with asm.cmt.right=0 and 1
  • Avoid the use of sscanf, better parsing and error checking, handling negative switch cases
  • Fix #16677 - Honor asm.sub.jmp in pd
  • Fix #13200 - Honor anal hints in asm.meta=0
  • Swap xref and flag comments as suggested in #18427
  • Implement asm.hint.imm and integrate it in visual

emu

  • Add arm16 ldrd esil tests
  • Implement aeis to initialize argc, argv and envp for emulation

esil

  • Fix emulation for ARM's ldrd
  • Add 'aev' as an alias for VbE and improve esil debugger
  • Fix #18736 - Eliminate REPEAT ESIL command, fix BSF/BSR x64 expressions

hash

  • Fix #18727 - Support more hashes in ph

io

  • Implement socket:// plugin, inspired by radare1
  • Rename tcp:// to tcp-slurp:// and improve help message
  • Add io.cache.nodup to not write the same bytes in the cache

lang

  • Add GO rlang plugin (#18646)

p…

  • Properly report error when trying to use an invalid pd subcommand

print

  • Fix empty lines in hexdump with multiple comments in one line
  • Support multiline comments in px
  • Fix #18309 - Better error messages for the pf command
  • Fix #18308 - Fix pf parsing issues and support write on enums and bitfields
  • Add help messages for pde pdr pdp
  • Implement 'px--' context hexdump command
  • Remove assertion in pFA
  • Fix #4903 - Handle 'w' in x/
  • Improve error message in pa command
  • Honor cfg.charset in px and support escaped encoding
  • Support null bytes in r_print_raw
  • Fix oob crash in 'pri' command

projects

  • Fix #18641 prevent overwriting projects with Ps

r2pipe

  • Add ===errmsg to support the new r2pipe side

search

  • Fix rafind2 issue with small or negative blocksize
  • Reset certificate search properly (#18664)

shell

  • Fix autocompletion for 'e ' and handle cfg.charset=
  • Fix #16674 - Kill ' and \ commands, use ':' for the only alias of =!
  • Implement @@@e and @@@E to iterate over entries and exports
  • Handle aliased files in wff and wtf commands
  • Remove tree-sitter and the r2-shell-parser

signatures

  • Consider collision
  • Fix bug in graph matching
  • Create function when z/ finds byte
  • Add R_SIGN_BYTES to metric search (#18703)
  • Support zignature collisions with the new zac command
  • Fix bugs in mergeItem zignatures
  • Refactor output and serialization of signatures
  • Make z/ search sigs seen in z*
  • Refactor signature matching
  • Add byte signature diff zd

tools

  • Add rafind2 -L to list IO plugins (same as r2 -L)

types

  • Fix #16687 - Handle multiple colon separated paths in dir.types

util

  • Add r_rbtree_cont_node_{first/last} (siol_eternal)
  • Add size parameter to r_magic_load_buffer

visual

  • Fix v;! in sync with V;!
  • Check if target is writeable in Vc+-
  • Add scr.optimize with experimental optimization ansi routine
  • Better v!!!!!!! behaviour
  • Add noflush guards to fix visual debugger mode

write

  • Implement wcf command to patch file with cache changes into a new file

5.2.1

3 years ago

See 5.2.0 release notes for changes since 5.1.x

Bug Fixes:

  • Fix all the high impact issues from coverity (non null terminated strings, oobreads, ub and uaf mainly)
  • Fix loading symbols from nested elfs
  • Fix i*j output on different environments
  • Improved bindiffing and signature matching results
  • Fix empty R2_GITTAP version string issue
  • pdcj (json output of the internal decompiler) is now ready for consumtpion
  • Fix build --with-openssl
  • Fix regexp search issues

Performance:

  • Optimize RCodeMeta API (about 10x faster decompilation in iaito)
  • Linux debugger is now 35 times faster (aaaa now takes 6s instead of 4 minutes)
  • Set anal.in=dbg.map on cfg.debug, speedups analysis

Improvements:

  • Load binary header structs before generating the ih json output
  • Extended ESIL support for more MMX instructions
  • Rafind2 output similar to grep by default, better for scripting
  • New color theme named bluy
  • Updated to the last GNU disassembler with support for all the last MIPS asm.cpu
  • oss-fuzz has been fixed and radare2-fuzz project created

Debugger improvements on Linux:

  • Fixed debugger step on ubuntu-arm64
  • Fix REGREAD errors on Linux debugger (not all kernels support that)
  • Fix Alpine linux debugger attach issue

5.2.0

3 years ago

Release Notes

Version: 5.2.0 Previous: 5.1.1 Commits: 316 Contributors: 35

Contributors

Alexandr Alexandr Alexis Ehret Alucowie Basstorm Dennis Goodlett Florian M"arkl Francesco Tamagni Khairul Azhar Kasmiran Lars Wrenger Murphy Pamplemousse Paul I RHL120 Reviakin Evgeny Roman Valls Guimera Sylvain Pelissier Taggggy condret el-goe gogo gogo2464 intruder-kat ivan tkachenko meme mio mrglm murphy pancake ramikg soroosh-chabi temp1337 valdaarhun wargio

TLDR

**anal**

  • Use =RS 8 for avr
  • Add =RS directive in reg profiles to define default value
  • Fix jump table analysis issue for r2ghidra.v850 (#18550)
  • Test for pcdelta ARM ldr fix
  • Fix pcdelta for ARM esil LDR
  • V850 jmptable fix, cmpval is almost always -1 and slows anal to a crawl (#18498)
  • Add missing v850 calling convention definition file
  • Remove unused type FcnTreeIter
  • Fix oobread ppc plugin
  • handleMidFlags: Reset ds->midflags on entry
  • asm.flags.middle: Don't split bb instruction
  • aae: Realign on fcn start if not in bb
  • Fix duplicate vtable entries after 'aaa'
  • af-*: Remove function flags too
  • Fix cX command and minor cleanup
  • Fix PSW register bits definition for v850
  • Add support for jump tables on v850
  • Fix #18284 (json command returning empty string)
  • Cd1 Cd2, Cd4, Cd8 are aliases for Cd[1248]
  • Fix SN register value for linux-arm64
  • Improve reg profile parsing and error handling
  • Detect shift for the first switch case
    • Fix gcc 9.2.0 kind of x86_64 jumptables
  • New command: aaw, flag all words pointing to known flags

android

  • Add r_file_binsh() and avoid hardcoding /bin/sh for Termux

api

  • Remove some exit() calls in libr
  • Rename r_cons_memcat to r_cons_write
  • ABI/API break. RAnnotationCode->RCodeMeta
  • Use more r_str_ncpy and improve it to not alloc beyond nullbyte
  • Add r_vector_flush()
  • Apply desired lifecycle of esil syscall and interrupt handlers in esil_dummy plugin
  • Add r_anal_esil_{syscall/interrupt}_{get/del}

bin

  • Parse the symbols from the ELF .gnu_debugdata section
  • Support x86_64 and macOS dyld caches (#18570)
  • Fix wrong demangling of tiff swab16 bit data
  • Use r_bin_import_free() as cb for imports list (#893)
  • Improve python disassembler and binary parser
  • Fix large loading times when parsing encrypted/fuzzed macho
  • Do not consider ELFs with .gnu_debugdata section as stripped
  • Fix Mach-O related coverity issues
  • Fix coverity issues in xnu kernelcache
  • Fix ASAN crash when allocating more relocs than the filesize
  • Fix long time analyzing oob objc data
    • Fix long time analyzing oob objc data
  • Fix asan crash found in r2_hoobr_dex_loadcode
  • Fix oobread bug in r_str_(ndup|nlen) APIs spotted by ASAN in SMD parser
  • Fix UAF in rz_bin_reset_strings()
  • Fix assert in iSj for invalid size sections
  • Minor ELF cleanup, using more size_t and ut64.max instead of 0
  • Add Support for new CoreSymbolication element format
  • Unset io.cache when not needed after bin.cache
  • Fix warning message when loading files with relocs

build

  • Move shlr/tcc into libr/parse/c
  • Fix meson build issues related to grub (#18554)
  • Fix the failure in finding the executing user's ID during install (#18508)
  • Add the nogpl meson option
  • Fix version not being updated after running sys/termux.sh
  • Update doc/license for more clarifications
  • Add plugins=nogrub option for meson
  • Improve sys/termux.sh checks
  • Do not run sys/ldconfig on Android
  • Add missing use_fork and use_dylink to meson
  • Fix #18397 - Be less strict when running sys/install.sh as root
  • Fix debian32 in CI
  • Allow custom CFLAGS for Debian packaging
  • Add meson -Dplugins=a,b,c to build only the specified plugins
  • Fixes to make the r2blob shine again
  • Add 32bit Debian packaging and bonus CI fixes
  • Add use_ssl meson option to be in sync with acr behaviour

charset

  • Implement ps, psz, psj and psj with charset support
  • Support multi-byte input in charset
  • Add more runes to pokered

ci

  • Fix linux-static pub action

cmd

  • Sync om and omj output

cons

  • Fix Ctrl-J issue and remove redundant code in 'Ctrl-J' block
  • Implement RConsPixel and RBraile APIs
  • Fix #16254 - grep expression parse improvement
  • Fix null derefs on RCons when no context is provided

core

  • Fix #18412 - Add R2_IGNVER variable to load plugins ignoring the version
  • Remove asm.bb (asm.bb.line -> asm.lines.bb, asm.bb.middle -> asm.bbmiddle)

crypto

  • Update to use keys that can be programmed onto a CPS2

debug

  • Implement drcq and show it in visual debug/emu
  • Fix #18502 - dangling pointers issues in dbm
  • Revert "dmi commands handle symbols, exports, main, entries too
  • dmi commands handle symbols, exports, main, entries too
  • Implement dmis command as an alias for .dmi*
  • Workaround the dmi issue by using rabin2 in macOS for now
  • Add dbg.maxsnapsize to avoid snapping huge maps

debug"

  • Revert "dmi commands handle symbols, exports, main, entries too

decompiler

  • Detect retdec decompiler (pdz) in cmd.pdc

diff

  • Add abstract Levenshtein dist
  • Abstract r_diff_levenshtein_path
  • Add Levenshtiend path API to

disasm

  • Honor asm.cpu for asm.arch=ppc.gnu
  • Fix #18511 - Add dwarf info in pdj
  • Add the m68k.gnu disassembler plugin
  • Show overlapped flags if requested and show them differently (#706)
  • Honor cfg.debug in asm.section using dmi.
  • Improve asm.meta=false for 16, 32 and 64 words
  • Fix #17761 - Do not trim the "ptr " when asm.syntax=masm
  • Add pi+ and pi- commands as aliases for 'pi +' and 'pi -'
  • Fix asm.lines.bb with asm.sections set

dwarf

  • Implement CLj command and improve CL output

emu

  • Apply desired lifecycle of esil syscall and interrupt handlers in esil_dummy plugin
  • Add dummy interrupt and syscall handlers

esil

  • Add r_anal_esil_{syscall/interrupt}_{get/del}
  • Boolify all the ESIL callbacks
  • Fix some asserts and nullderef spotted on arm64
  • Esil plugin management APIs
    • Add r_anal_esil_{get/del}_op
    • Fix deactivating plugins on r_anal_esil_free
    • Add local getter for active esil plugins

fs

  • Fix absolute paths and add r_return guards
  • Fix fs.posix.cat and use r_sys_dir instead of reimplement (-48LOC)

graph

  • Add support for highlighted edges in graphviz
  • Add ageh command to let users define which node links should be highlighted

hash

  • Implement ssdeep fuzzy hashing algorithm
  • Fix name collision for SHA functions

io

  • Close #18257 / Remove RIODescData
  • Enable io-plugins to set bin.baddr on launch
  • Fix comment
  • Implement custom bit size cyclic memory layout and wrap flags in
  • Rename r_io_map_get_for_fd to r_io_map_get_by_fd
  • Rename r_io_map_resolve to r_io_map_get
  • Rename r_io_map_get to r_io_map_get_at
  • Implement slurp:// uri handler plugin
  • Implement omd command, as a simplified version of om
  • Fix infinite loop in r_io_map_next_available
  • Fix #17049 - oa whithout filename specify, add oa test
  • Add help message for winkd://? and improve desc

json

  • iVj must print valid json, not empty output (#18571)
  • Add json version output to r2 -vj
  • rasm2 -L now shows an array of objects
  • Fix #18284 (json command returning empty string)

lang

  • Add #!*? command to show rlang plugin examples
  • Add support to the V programming language for scripting

print

  • Implement pFX command exemplifying the use of r_sys_unxz()
  • Android Binary XML support (#18545)
  • Improved pdc, added pdco and pdcj, print orphan nodes
  • Fix alignment issues in RTable with utf8 fields

reg

  • Fix null printf issue in arpi command

search

  • Import @siguza's arm64 xref finder
  • Show results after pressing ^C in /ad
  • Fix /ad of multiple consecutive instructions

shell

  • Fix proper hash comments & quotes mix (#18551)
  • Implement whoami and uid commands
  • rasm2 -Lj works the same way as -jL
  • Add variable autocompletion class in !!!
  • Add scr.loopnl to add a newline on all the @@ loops

test

  • Add R2R_SKIP_ASM env var handling in r2r

tools

  • Fix #18391 - Show help in r2pm even before initializing the db

util

  • Add r_file_find to recursive list files and subdirectories into a list
  • Rename dep in rbtree.c to depth
  • Rename d, d2, d3 in rbtree.c to direction ...
  • Optimize r_rbtree_cont_{first/last} #18485
  • Implement r_rbtree_cont_node_prev (siol eternal)
  • Implement r_rbtree_cont_last
  • Fix endless loop in r_rbtree_cont_node_next
  • Add unit test for r_rbtree_cont_node_next
  • Fix segfaults in rbtree.c (parent backlink)
  • Add r_rb_cont_tree_node_next (SIOL Eternal)
  • Add backlink to parent in RBNode (SIOL Eternal)
  • Add r_rb_cont_tree_find_node (SIOL Eternal)

visual

  • Add agfb for braile graphs
  • Revert "Fix memleaks in agraph by keeping a separated list of dummy nodes
  • Fix memleaks in agraph by keeping a separated list of dummy nodes
  • Initial implementation of graph edge highlighting

visual"

  • Revert "Fix memleaks in agraph by keeping a separated list of dummy nodes

Associated releases:

See below for the changelogs:

Highlights

Improved V850 Support

This release comes with several improvements for the V850 (in concret e2) cpu. The default disassembler is not really supporting many of the instructions of this architecture, but you can use r2ghidra as disassembler and analyzer which comes with a bunch of improvements for this architecture. Here's a list of the most relevant changes:

  • Add support for cyclic memory layouts, this memory model is only supported in some rare architectures like s390, VAX, old ARMs and some V850. And this is not supported by any other static analysis tool (only by some closed source emulators from what @trufae could find).
  • Implemented jump table analysis and pointer table size prediction, requires latest r2ghidra to work
  • Add /cu command to find UDS dispatch tables and pointers for CAN BUS handling firmwares
  • The new omd command makes creating memory layouts for embedded firmwares much easier, but at the end it's just a simplified version of om.
  • Add slurp:// uri handler which does the same as oom to reload the given disk file into a malloc:// which is ideal for loading firmware dumps with ram contents for proper emulation.
  • Fix PSW register bits definition for v850
  • Added default calling convention for v850e2-gcc

ARM64/Apple support

  • Android binary XML decoder available in the new pFa command (thanks @meme)
  • Added support for the new CoreSymbolication file format (thanks @mrmacete )
  • Support the latest dyldcaches from macOS/arm64 (thanks @meme)
  • Add core plugin using @Siguza 's arm64xref search code which is 200x faster than /r with capstone
  • Fixed large loading times and segfaults when loading some corrupted mach0 binaries
  • Improved ARM32 LDR esil emulation which may fix some missing xrefs

Analysis

  • New command: aaw, flag all words pointing to known flags
  • Float/Double/LongDouble types supported in pf [fFG] and wv[fFG]
  • Better handling errors when parsing invalid register profiles
  • Add =RS directive to define the default register size.
  • Assign pdc, pdd, pdg, pdz to their respective decompilers
  • Honor all asm.cpu values for the powerpc GNU disassembler
  • Added levenstein binary diffing path APIs
  • Improve pdc pseudo-decompiler output (show orphaned bbs) + pdcj support
  • Add support for new crypto keys on CPS2
  • Add brand new implementation of ssdeep (by @trufae) under the MIT license.
  • Fix /ad command results are now correct and tested.
  • New sixref command (see siguza's plugin in the arm64 section)

Shell

  • Add lsr, whoami and uid commands
  • Move the Vlang rlang plugin from -extras to core. it's now stable and ready to use.
  • Add scr.loopnl to add a newline on all the @@ loops
  • Improved dmi commands to load more symbols in debugger mode
  • Fix #16254 - grep expression parse improvement ##cons
  • Add freebsd-x86-32 support for sflib based shellcodes with ragg2

Binaries

  • Added bin.cache as a high level value for io.cache
  • Add support for loading symbols from .gnu_debugdata sections on ELF binaries
  • Support latest dyldcache and coresymbolication files for macos-arm64 and ios
  • Fixed segfaults and large loading times on 6502, PYC, DEX, MACHO, ELF, DWARF formats
  • Dwarf information is now listed in the output of pdj and other CL listings

Visual

  • Add support for highlighting edges in graphviz and ascii graphs
  • Honor cfg.charset in w, ps, psz and psj (thanks @gogo2464 )
  • Add minigraph support in visual (check graph.mini)
  • Support multibyte input conversions in custom charset encodings
  • Improved glob expression text filtering (thanks @as0ler )
  • Implemented braile-art graph rendering (afbg)
  • Show status register bits in visual debugger mode

Build

  • Clarify license usage in target build for core modules and installed plugins (
  • Fix static builds with meson
  • Handle use_ssl, use_fork, use_dylib, nogrub, nogpl and custom plugin builds with meson
  • Cleaned up slow tests and make CI run in GHA in 8min
  • Import patches from Termux

5.1.1

3 years ago

This is a minor bug fix release after 5.1.0 was out. But as usual it comes with some new features! Contents are mainly bug fixes and behaviour and abi compat should be fine 5.0.0, this is, all the built packages for 5.1.x will work. Highlights:

New Stuff

The new /cu command search for UDS tables useful for reverse engineering ECU firmwares. The code has been taken from binbloom and integrated as all the other search commands in r2, so you can have json, quiet, and r2 commands outputs for it.

  • Add /cu[qj*] and r_search_find_uds API

Screenshot 2021-02-11 at 10 47 18

Color2g graph nodes

This feature has been there for more than 10 years, but barely tested or used, after a user request and some testing the afbc command to improve to support specifying the color by name or following the CSS syntax like its supported in the color themes.

Screenshot 2021-02-11 at 11 12 28

In addition the @ key have been handled in the graph view to toggle graph.layout variable, so you can easily rotate between portrait and landscape modes.

Visual Gameboy 2bpp Pixmaps

You can now use the visual mode to search for 2bpp bitmaps usually embedded in Gameboy roms. This is part of the retro-r2 project which aims to improve the support for old game consoles

Screenshot 2021-02-11 at 11 27 51

Encoding charsets

The custom charset encoding support have been extended over the w command to be able to encode an ascii string into pokered charset encoding and write it directly. The decoding support was already added in ps, and the integration and improvement of this feature will slowly come in next releases, as it fits into the retro-r2 plan and has been a long awaited feature by the rom hacking scene. Kudos @gogo2464 for that stuff!

Screenshot 2021-02-11 at 11 38 30

Reverse Shell

Do you need to get access to a shell on a machine under nat or firewall? Try out the new =r command! it will take the host:port as argument and try to connect there to expose an r2 shell. This was implemented to get a shell in the GHA CI to debug an issue, but I guess this feature could have more uses :)

Screenshot 2021-02-11 at 11 36 09

Other Improvements

Analysis

  • Allow to analyze bigger functions by reducing the stackframe usage and using anal.depth better
  • Reclassify some AVR instructions away from SWI

Assembler

With the aim in mind to cook gameboy roms with just rasm2, the assembler directives have been documented in the help message and manpage, the .fill one now works with only 1 parameter.

  • Improve .fill and rasm2 -hh with documented directives
  • Refactor and cleanup the z80 assembler

bin

  • Faster mach0 and dyldcache parsers
  • Fix iCj for mach0

build

  • Fix a credentials downgrade problem in Install.sh
  • Introduce w32 and w64 in the CI
  • Add Windows ZIP in the CI (#18310)
  • Assign radare2 binr target
  • Support statically linking system OpenSSL
  • Define PYC_ROOT and WASM_ROOT (#18290)

shell

  • Add print, println, and placeholder for printf and printfln

5.1.0

3 years ago

Release Notes

  • Version: 5.1.0 (2021-01-26)
  • Previous: 5.0.0 (2020-12-21)
  • Commits: 291
  • CommitsFromRizin: 35
  • TotalContributors: 45

I will try to be more verbose with the release notes this time, it could help everyone to understand better the changes that happen, project directions and new features, as well as be more entertaining, even readable by Siri.

As I'm writing these lines I know I will be missing something, so please, if you think this summary is missing any important details let us know and our apologize in advance!

Updates from r2land

This is the second release after the fork, we are still putting things in place and optimizing the development for what we had in mind. Probably many people expected a public statement about the events, but this post end up being used as a therapy and focused on spending the time for what it matters: have fun, move fast and code for what matters most for the users and contributors without losing time and nerves in personal conflicts or strict roadmaps, just fixing, improving and keep vibing the amazing community in r2land.

There are frequent back and forth pulls of changes from both projects (see sys/derizin.sh for more details), and future directions of both projects will probably differ enough to lower that pace. If you are curious about other side projects:

About r2ghidra, it was rebranded (previously named r2ghidra-dec), and has been updated with all the changes in rz-ghidra, but adds ACR build support (which works on FreeBSD), removes the need for bison and flex, See https://github.com/radareorg/r2ghidra for more details about the 5.1.0 release.

On r2cutter, the repository, project and icon has been renamed from Cutter to r2Cutter as well as updated the r2 dependency to the latest 5.1.0, but the CI hasnt been massaged yet to do the release builds, so no release of r2cutter is planned until this issue gets fixed.

r2dec is still available and working, just remember to update your package database with r2pm update.

Contributors

Alexander von Gluck IV Alexis Ehret Allen McIntosh Anton Kochkov Aswin C Briand Djoko Carson McManus ChD1 Dennis Goodlett Eduard Eduard MURESAN Fangrui Song Florian Maerkl Francesco Tamagni Fredrik Fornwall Giovanni GustavoLCR Kamil Rytarowski Khairul Azhar Kasmiran Liumeo Murphy Paul I Qijia Liu RHL120 Riccardo Schirone Riccardo Schirone Sahil Siddiq Sylvain Pelissier aemmitt-ns aemmitt-ns condret eagleoflqj gogo gogo2464 ivan tkachenko laohuai liumeo mrglm pancake pancake pancake ratijas wargio yossizap yossizap

TLDR

Highlights

This release comes with a large list of bug fixes, many of them you may probably not even noticed, but some of them are important for users and packagers, it has been tested on a large list of platforms, not just in the CI, but also in sparc, mips, powerpc and other funky hardware (Thanks @unixfreaxjp !). We are not forgetting the new Macs, and this release comes with few fixes for fat binaries, kernel caches and arm64 floating point emulation (kudos to @mrmacete and @aemmitt-ns for them!).

Projects: One of the most awaited feature is now finally available for testing, the git support has been enabled by default and some options and backward compatibility transitional code have been removed. Please test this out and let us know if you spot any issue! thanks @trufae for this!

The CI have been rewritten for simplicity and it's now building and publishing Android, iOS, macOS, Linux and Windows artifacts on every commit, ASAN, LGTM and COVERITY are still there, but all jobs run in github actions.

Lots of improvements in the support for JSON have been added by @liumeo also, several memory leaks have been cutted down, which are always welcome.

Support for streaming large files over mg, and added support in r2frida is now available thanks to @as0ler!

r2wars

The r2wars game runs on top of r2, but it needs some tweaks for the esil vm to work, this version optimizes this by checking configuration options outside hot loops.

  • Cache cfg.r2wars value outside the eval loop

Those 'hacks' will be eventually removed when r2wars gets able to emulate syscalls, traps and low level stepping for context switching at esil-expression level.

  • Support sbfm/ubfm in arm64
  • Initial support for arm64 asm extendtype
  • Add test and update arm.winedbg (#18117)

The arm64 assembler has been extended support more instructions and be more formal and correct.

  • Implement i4004 assembler

It's always great to welcome a new supported architecture for assembling code (disassembler for i4004 was already available). Kudos to Liumeo for this nice addition!

bin

  • COFF: handle empty sections (#447)

  • Dont demangle with libs unless requested

  • Add bin.cache evar to use io.cache when bins need to patch relocs

  • Fix Mach-O rebase on fat slices

  • Add additional ELF header fields to rz-bin output

  • Fix PE Delay Imports for multiple delayed DLLs (rizin)

  • Lowercase DEX method attributes and move r_num_bit_count()

  • Initial implementation of the DEX annotation parser

The DEX annotation metadata is now parsed in the DEX plugin, this means, that parsing is actually a bit slower (it's parsing more information) but provides more context and information of the application classes and methods. Use bin.verbose=true to get that information.

This metadata must be imported into r2 somehow, but this interface hasnt been defined yet, so only plaintext representation is supported at load time. Probably finding a good tree representation for an Sdb instance could work.

radiff2

  • Add more checks on the passed files and fail early.
  • Honor graph.font in diffing graphs too
  • Remove buggy Levenshtein diff algorithm and rename the original code

Some confusing usage and documentation have been updated and the default diffing algorithm is now faster. (Thanks MaskRay for spotting it and Liumeo for massaging it)

ci

The whole CI scripts have been rewritten to run everything in GithubActions, and adjust the test of PRs to 20min, ASAN is only running in master (takes 1h), and every commit is compiled for linux, macos, windows, ios and android. No breaking commits can be merged. And all artifacts are available to download for every single commit and architecture.

As long as the Sanitized build takes 1h to run the testsuite we decided to make it run only in the master branch, if any regression happens there it's easy to fix with the crash logs in GHA.

This is the setup of jobs in the current CI:

  • Add android-arm64 target to build release artifacts
  • Add TCC ci task which is able to build and run the testuite
  • Added cydia builds for arm64
  • Add job to test build and install with spaces in builddir and installdir
  • Add job to test install, uninstall, symstall for proper purgation and avoid disasters
  • Fix the badge in the README
  • Add asan ci job to run all fuzzed bins with a sanitized build (takes 1h)
  • linux-test builds with acr and takes about 20min to run all tests
  • CoverityScan service find vulnerabilities with advanced source code analysis.
  • LGTM service spots static source analysis good practices
  • Initial attempt to switch to Capstone 5, needs more

RTable

  • Dashes in RTable with X format
  • Implement RTable:sql and add RTable.name

You may not know about RTable yet, but it's an api and command modifier that will be used more and more over time. In short, RTable provides an API to create tables with columns with types and rows with data and an api and query syntax to operate over those tables in the same way as you would do in an SQL database but using the cryptic syntax of commands we like in r2land.

This release introduces a new output for SQL. This means that any information stored in r2 can be exported in SQL statements and processed in your favourite SQL database. This is an example usage:

$ r2 -AA /bin/ls
> afl,:sql > functions.sql
> !sqlite3
sqlite> .read functions.sql
sqlite> .tables
fcns
sqlite> select count(name) from fcns;
128

RISCV

  • Fix #18212 - Detect RISCV gdb servers
  • Add riscv in RSysArch and make it an enum, not a bitmask
  • Update RISC-V ESIL with sign extention operator (#18109)

Native support for Linux/RISC-V is now available as well as remote debugging via GDB, the ESIL emulation have been improved a little bit.

disasm

  • Fix HUGE bottleneck in the WebAssembly pseudo disassembler and analyzer
  • pd, is an alias for pdt (pdt will be removed soon)
  • Honor meta size in asm.meta=false and add tests
  • Fix #18202 - Large Cd truncates and crashes in pd
  • Implement print disasm until optype

ESIL

  • Fix x86_cs cmpbs esil
  • fix x86-cs rep/repe/repne esil expressions

@condret find out (and fixed) a bug in the way rep instructions were constructed in ESIL in x86.

  • Support arm32 esil stmib/ldmib
  • Add sign extension assignment operator (#18092)
  • Add floating point operations for emulation

Thanks to @aemmitt-ns (Austin Emmitt) for implementing support for floating point arithmetics in ESIL as well as adding support for most FPU instructions for ARM64. That's an important move forward in order to improve the language to handle more instructions and architectures.

A work in progress support for RIOBanks is not yet included in this release. But hopefully in the next release @condret and @trufae will be manage to finish the new API and commands and integrate them into the ESIL to support memory banks in GameBoy emulation for example (as well as add support later for other archs).

  • Add support for RAnal.ESIL plugins

Those new types of plugins are right now just a place holder to call init/fini and do whatever you want from there. But in the next release ESIL plugins will provide the ability to expose some functionalities to the ESIL VM, syscall implementations in userland, libc emulation functions, custom esil operations, hardware devices, etc. Join the Discord, Telegram or IRC channels to raise the topic if you are interested on more details.

fs

  • Add support to stream files using mg (#18253)

This feature has been added pair to pair with the r2frida implementation, this way enables r2 to download all the files and its contents without any file size limitation from the remote device to your host. All the RFS plugins API has been changed to if you are using custom RFS plugins you may take care of that.

Support for uploading is not yet implemented, but it is planned in the near future.

Thanks Murphy for that great contrib!

io

  • Accept rwx argument in onn command
  • Add onn command to fix custom map assignments

Those changes and new command are required for the projects to be able to save and restore the status of files, binfile and iomaps in proper order and reference.

  • Fix and refactor the ar:// plugin

The refactoring of the io.ar plugin spotted a regression in open_many() which is not yet fixed, brave volunteers are welcome!

Projects

The most requested feature for r2 has been reworked to actually make it work and improved several use cases that weren't handled before:

  • prj.git is now enabled by default if git is in path

this means that everytime you run Ps after saving the changes in will prompt you for a commit message. The ability to rollback to any previous state of the project by just calling git reset and Po becomes very handy when bad things happen or you just want to track your progress.

As long as projects are in plain text they are readable in git diff.

Improved support to ease the workflow to support multiple users sharing the same project via git will be implemented in future releases.

  • Handle io.maps and bin.segments in o* to handle custom maps in projects
  • Add map name information in o* output
  • Honor mapaddr for malloc in o*
  • Save the write cache in projects

As long as the user can create custom maps on specific files, the projects need to determine if there's any binobject associated with a specific file for processing a map. This puzzle is solved by the o* command which now prints the right commands to reconstruct the same IO environment starting from a clean session.

  • Reworked P command with RProject and prj.name integration
  • dir.projects becomes abspath when set
  • Fix projects by removing code and honoring prj.name
  • Save the write cache in projects

The P command is now much more stable and all the subcommands work as expected, some tests have been added and project renaming can be done via command or via evar prj.name. The magic behind this evar-project-action is done by using the RConfig.getter APIs that have been there for a while but barely used, the value is updated at get time from the project instance details. This way it's possible to rename a project like this:

> e prj.name
test
> e prj.name=case1
  • Tell the user that debugging projects don't work

Projects are working, but they are far from perfect, one of these missing corners is the debugging support, the main reason for that is the lack of integration of aslr rebasing in projects, this will be eventually implemented, but for now it's better to avoid the user to mess the thing.

In any case, it's always recommended to have your own manually writen scripts to do setup some flags, memory patches or breakpoints, so you are more in control of what you run in a living process.

  • Fix calling convention save/restore
  • Print call convention once in afi
  • Warn once about the missing anal.cc
  • Use RConfigNode.getter callback in anal.cc to be in sync with k anal/cc/default.cc

Some improvements in the way calling conventions are handled inside r2 enabled the use of anal.cc like it's done in prj.name, with a 'live' evar. default calling convention is defined by the architecture but can be redefined by the rbin plugin or the analysis information. In addition the user can also specify a custom CC for each function, all those details are preserved with the anal.cc evar and the tc and afc commands.

  • Remove transitional projects code
  • Remove file.path and file.lastpath and add RProject
  • Remove the prj.simple option
  • dir.projects becomes abspath when set
  • Use UID instead of PID to identify the user to avoid changing projects everytime

Refactor

  • Refactor tcc and afcl commands, improve help and JSON
  • 25 commits refactoring the code to use the formal PJ api to generate JSON

This includes honoring the settings defined by the user in the cfg.json evars, this nice feature was introduced by @hexploitable in the previous 5.0 release.

[0x00000000]> e cfg.json.num =?
none
string
hex

Rizin

  • Added support for regex in test output and stderr
  • Massage RRegex to fix codingstyle and a null deref.
  • This resulted in a cleanup and refactoring of RRegex

One of the changes introduced in Rizin is the ability to use regexps to check the output of an r2r test, but after doing some cleanup in the regex code some issues were spotted in the logic, so it's not encouraged to write tests using regexps yet. Unit tests has been added, but it still requires to be fixed.

The bugs are logic bugs, not exploitable, but some match expressions won't work. But at least the feature is in sync.

Other commits taken from RZ grouped by author are:

Paul I

  • COFF empty sections
  • memleaks in ophandlers
  • rtable X dashes

xvilka

  • part of the improvements for indentation

wargio

  • avr anal warning due unpopulated mnemonic and further refactoring
  • fix ao rjmp issue

ret2libc

  • Fix misusess of r2 commands inside r2
  • Use r_core_flag_get_by_spaces() in getFunctionName()

kazarmi

  • Fixed AVR anal plugin warning due unpopulated mnemonic
  • Fixing clang flow warnings (#321)
  • Fix #rizin302 - Fix function modification detection false
  • Remove all dead assignment detect by clang sa (#310)

yossizap

  • Fix trace crash
  • Add regex support in r2r

Florian

  • Fix null deref in rbtree
  • Implement delay imports in PE parser

shell

  • Implement rax2 -I to convert from/to LONG and IP Address

Sometimes a shellcode or a piece of program is doing some operations with IP addresses and it stores the IP address on a 32 bit register value. rax2 now provides a handy commandline option to ease this conversion. This feature was already available as a hint for the disassembly to convert instruction arguments to ip addresses.

$ rax2 -I 192.168.1.32
0x2001a8c0
$ rax2 -I 0x2001a8c0
192.168.1.32
$
  • Implement $i and $I numvars

Those two variables have been added in order to ease writing some scripts that navigate thru the code moving forward and backward honoring the instruction boundaries of the current analysis information.

So $i is the address of the next instruction and $I of the previous. Things get more interesting when the braces join the game: Using $i{3} gives you the address of 3 instructions forward. and the same goes for $I{3} to go backward.

  • Fix #18171 - Support RNum for syscall-name in asl command

The asl command has been modified to use RNum when parsing the argument, so its possible to

API

  • Add RFile.new and RFile.move APIs
  • RFSPlugin API has changed

Plugin delegates return int instead of RFSFile to avoid leaks and uafs, needed for streaming largs files over mg.

  • New RAnal.ESIL plugins

Add esil.dummy in your plugins.cfg if the build fail with missing R_ESIL_PLUGINS error.

Visual

  • Fix ecn (and VR) when no custom theme was set in .rc

In human words: rotating color themes is working again!

  • Implement history filtering for dietline
  • Initial implementation of r_cons_eprintf

This new API is wrapping eprintf() but its also able to buffer the results and flush them after r_cons_flush().

FUTURE: The need for this API is to improve the r2pipe API and handle a 3rd communication pipe to handle asyncronous error messages. This is a long term plan and should be backward compatible, so no r2pipe scripts may break.

  • Fix help rendering: avoid printing trailing whitespaces (#18115)
  • Improve str.wrap, add cons.line and fix cons.printat glitch
  • Fix #17940 - Show ConfigNode options when selected in Ve
  • Box borders in graph and panels are now in yellow
  • Update www/t from radare2-webui
  • Fix cascading solitaire issue in panels menus
  • Fix the 'c' cursor behaviour in disasm

Those commits improve the experience in panels, fixing an anoying bug in the menus, improving the cursor mode. The default color theme for the frames makes it easier the eye.

The heavy webuis were removed in 5.0, but we are still shipping t/iled and p/anel ones, it's known that the webui repo needs some attention

bindings

The bindings have been also updated with some more valadoc documentation that can be read in here:

https://radare.org/vdoc

This documentation and API can be used for any bindings generated by valabind, this is: python, nodejs, ruby, go, v, ... the work to stabilize the apis in this module focused in RConfig, some fixes have been done in this module.

security

As usual, every release of r2 comes with a large list of security vulnerabilities, bugs and crash fixes. The list below sumarizes the most relevant ones:

  • Fix #18274 - Fix crash in r2 *.wasm
  • Fix crash in XNU kernel parsing (no cache)
  • Fix code injection vuln in .ic* with ObjC classes
  • Fix trace crash caused by a mismatch between the register profile and op anal
  • AVR: Fixed profile, (null) instruction and anal
  • Fix potential null-deref in r_rbtree_cont_foreach()
  • Fix crash when wasm file contains symbols with large names
  • Handle ^C and fix ASAN crash in aeA command

build

  • Disable AVR plugin from all static builds because of the duplicated symbols issue introduced in recent refactoring.
  • Add r2.1 when installing with symstall
  • Fix debugger build problem in android-x86_64
  • Remove --without-r2r configure option
  • Create dist/ to hold all the distribution build files

Merged some patches coming from Termux to improve the debugger support on android-x86. The r2r testsuite executable is always built and should be available to all the user installations.

Also, some issues has been fixed in sys/install as well as new CI jobs to verify no regressions happen on install/uninstall/spacesinpaths, etc.

config

  • Fix some returns to fix initialization issues in evars
  • Remove unused cmd.xterm and use * instead of strcmp for ?
  • Support evar filtering in eq and check for bool type in RConfig.toggle
  • Expose RConfigNode.options APIs to avoid messing with internals
  • Count lines is a prefix operator
  • Add a progress bar for when scripts are running
  • Honor R2_CFG_NEWSHELL=0 to disable it
  • Seek command ignores the tmpseek
  • Add missing vars from ?$? in ?$ and sort them alphabetically

5.0.0

3 years ago

r2-5.0

Commits: 510 Contributors: 65

Interface

  • Added the Comma API
  • Added r_str_wrap() and r_cons_printat() APIs
  • Fix adding comments in panels
  • Improved help messages
  • Removed problematic fortunes
  • Add ?et command to change terminal title
  • Fix double-click issue in vte terminals
  • Formalize the flag names and its filtering APIs
  • Fix return code when using q!. Fixes r2pipe.go
  • Add experimental asm.flags.real to get strings from bin.str.real
  • Removed unmaintained enyo and panels webuis (-2MB)
  • Set realname on all bin strings for better asm.flags.real when bin.str.real is set
  • Fix ansi colors embedded inside json output formatting
  • Improve socket and http server APIs
  • Add opn/opr/opp commands to rotate between opened files
  • Initial implementation of scr.cursor for keyboard accessibility in visual and panels
  • Add asm.hint.call.indirect to make indirect calls follow the target address (#17968)

Performance

  • Use sdb_set instead of sdb_querys (aaaa is 7x faster)
  • Optimize IO.cache (makes bins with relocs much faster)

Signatures

Debugger

  • Sync anal and debug tracing information
  • Fix a crash in dts+ command with empty register arenas
  • Attach to target pid/tid on remote lldb connect
  • Add a warning when a breakpoint is placed in an invalid map
  • Add commands to parse mangling pointers glibc heap

Analysis

  • Improve signature matching, threshold, refactor and optimize related code

  • Directly apply Callee Args in Type Matching

  • Takeover variables when splitting functions

  • Always register the derived CC from the reg profile

  • Add bbhash to detect modifications in functions (and reanalize if patched)

  • Implement basic block listing commands (abl*)

  • Implement tcc-* commmand to unload all calling conventions

  • X86

    • Add amd64syscall and anal.cc evar
    • Fix esil for cmp/sub instructions
    • Add amd64syscall calling convention
    • Fix ELF R_X86_64_PLT32 relocation entries patching (#17587)
    • Fix x86 CMC instruction
  • MIPS

    • Improves mips.gnu esil
    • Add JALR JR when the address can be computed
    • Fix GP calculation when there are multiple entries
    • Fix MIPS C-TYPE instruction check
    • Set asm.cpu for mips.gnu derived from the ISA defined in the ELF
  • ARM

    • arm mte addg/subg decoding
    • fix arm it block analysis
    • BLR arm64 is type=RCALL (before it was UCALL)
    • ARM64 assembler can now assemble AND and BIC instructions (Thanks @mrmacete!)
    • Add initial support for arm and arm64 ELF relocs
    • Handle RELATIVE (todo) and IRELATIVE relocs in ARM64 ELFs
    • COFF: add ARMNT and ARM64 support
    • All testsuite run on arm32 and arm64
  • v850

    • Improve invalid instruction detection
    • Implement the pseudo disassembler plugin
    • Fallback to anal=v850 when using asm=v850.gnu
    • Add ep, sp, gp lp register aliases for v850
    • Added function preludes (aap finds much more functions)
    • Fix calling convention argument register usage for v850
    • Add all instruction descriptions
    • Set v850 disassembler when opening v800 ELF files
  • TMS320

    • Implement pseudo disassembler plugin
  • PowerPC

    • Initial assembler support
    • Improve reg profile to support calling conventions
  • RISC-V

    • Add all instruction descriptions
    • Add Fix shift instruction analysis
    • Fix ESIL for JALR and AUIPC instruction
  • SPC700 plugins moved to extras

ESIL

  • Add sign-extension operations
  • Implement aof to filter expressions using the dfg api
  • Fix unexpected FPU exception in ESIL emulation bug
  • Enlarge ESIL VM stack from 32 to 256

BSD

  • Support pkgconf (BSD alternative to pkg-config)
  • Fix build with tinycc, unfortunely the final binary segfaults
  • Fix debugger support in FreeBSD
  • Implements r_sys_aslr for NetBSD
  • Fixing r_sys_pid_to_path for DragonFlyBSD
  • Setting ASLR support for DragonFlyBSD

Windows

  • Fix r_core_editor() on Windows (#17887)
  • Fix MSVC template demangling symbols
  • Expose TEB address as a flag on Windows
  • Add network support to WinDbg/KD (KDNET)

Apple

  • Support ObjC small method lists
  • Support iOS 14.x dyld shared cache
  • Add support for new macOS kernelcache

Changes

  • Rename asm.filter to asm.sub.names
  • Rename asm.var.sub to asm.sub.var
  • Deprecate the afc= command.
  • Removed all globals from main functions
  • afc= -> e anal.cc
  • Fix big endian DWARF parsing
  • labels no longer stored in sdb
  • Refactor Variable Constraints out of SDB
  • Fix r_anal_block_automerge incorrectly merging blocks

Thanks to

Authors

4.5.1

3 years ago

Release Notes

Version: 4.5.1 Previous: 4.5.0 Commits: 20 Contributors: 9

Highlights

bin

  • PE
    • Fix null dereference in Pe64_bin_pe_compute_authentihash
  • ELF
    • Avoid buffer overflow while identifying imports

build

  • Fix Cydia/iOS packaging and compilation issues
  • Enable LTO in sys/static.sh
  • Install ldid2 as well, to sign packages for cydia
  • Use meson install instead of manual installation in meson.py

core

  • Add Function Name, Constants, Globals and Local Variables to RAnnotatedCode

port

  • Backtrace support for haiku

util

  • Add r_sys_now_mono() and use in r2r
  • Fix NULL dereference in r_pkcs7_parse_spcinfo()
More details

Authors

4.5.0

3 years ago

Release Notes

Version: 4.5.0 Previous: 4.4.0 Commits: 426 Contributors: 58

Highlights

Analysis

  • Initial API for base type kinds (enum, struct, union)
  • Rename PowerPC to PPC
  • Improve RISC-V analysis for compressed instructions
  • Add endbr64 as a function prelude for x86-64 binaries
  • Improve BP vars/args detection
  • Detect register args used only by callee
  • Match args name/types from function definition
  • Improve itanium RTTI parsing and vtable search
  • Refactor Variables out of SDB
  • Implement basic concept of signature bestmatch

asm

  • Add support for WebAssembly SIMD extension
  • Boolify r_asm_is_valid and r_asm_set_syntax API
  • x86_64/x86_32: Implement assembler endbr32 and endbr64 instructions
  • x86_64: Support mov r64, 0xffffffffffffffff
  • x86_64: Fix mov r32, -imm32 encoding
  • Move inferior GNU Hexagon plugin to extras

bin

  • Apple Symbols file
    • Improve Xcode symbols parser
  • COFF
    • Improve relocation support on COFF file format
  • DEX
    • Fix several crashes when loading corrupted files
    • Performance improvements in DEX parsing
  • DWARF
    • DWARF 4 and 5 line parsing additions
    • Several improvements/fixes in parsing
  • ELF
    • Use Dynamic segment entries instead of sections to find relocations
    • Add support for BA2 ELF
    • Add support for relocation entries for AARCH64 and PPC
    • Print a warning when the entrypoint cannot be found and it is automatically set somewhere else
    • Make glibc heap commands faster by resolving main_arena symbol
    • Add support for glibc heap tcache pre/post glibc version 2.30
    • Add missing reloc definitions for C-SKY, RISCV and AARCH64
  • kernelcache
    • Fix rebasing offset
  • Mach-O
    • Fix symbol names truncation issue when dealing with overly long strings
    • Support arbitrary length identifiers
    • Fix relocations on ARM Thumb
    • Support Mach-O threaded binding for arm64e
    • Rebase and strip pointers on Mach-O arm64e
    • Fix parsing of objc class data pointer
    • Do not automatically set the entrypoint of libraries
  • PDB
  • Pyc
    • Move to radare2 core repository and improve/clean it
  • PE
    • Fix crash when resolving corrupted ordinal exports
    • Speedup parsing PE exports

build

  • Various fixes for Haiku
  • Add support for binr/blob and fix android build in meson
  • Add --without-dylink configure flag to disable libdl features
  • Add Debian 8 Jessie to GitHub CI
  • CentOS tree sitter fix using gnu99 when available
  • Fix the static build by dynamically resolving libutil symbols
  • Add release Github workflow to create all the release artifacts
  • Introduce --without-r2r configure option to disable compilation of r2r

cons

  • Add VT sequences input support for Windows

crypto

  • Remove hardcoded supported encoders names (e.g. base64, base91, punycode)

debug

  • Fixes for windows debugger
    • Improve exception logging
    • Fix inconsistencies in killing/restarting a process
    • Fix detaching without killing debuggee
    • Expose exception reason for di

io

  • Add new fd:// (handle:// on windows) plugin
  • Support self:// plugin for Solaris and Haiku OS
  • Fix regression while loading large files (>2GB) on 32bit systems

lang

  • Fix C/Cpipe when non standard library paths are used
  • Implement RLang.spp for templated scripting
  • Move #!v out of core (it's now available via r2pm)
  • Fix usage of #!python, #rust, and #cpipe
  • Do not include C/cpipe RLangPlugins on windows

magic

  • Add Android boot image signature

socket

  • Fix socket connect with SSL

util

  • Move RAnnotatedCode API from r2ghidra to r_util so it can be reused
  • Refactor r_big for gmp and SSL
  • Remove unused RConstr API
  • Remove unused RRangeTiny API
  • Add support for weakref RStrBuf and add r_strbuf_setptr API
  • Add r_vector_fini and r_pvector_new_with_len API and add bound checks on all RVector APIs
  • Add support for n# in pfc
  • Add generic reference counting implementation

rabin2

  • Fix go detection in non-elf binaries

radare2

  • Config variables
    • Renamed variables
      • asm.jmpsub -> asm.sub.jmp
      • asm.var.submin -> asm.sub.varmin
      • asm.tailsub -> asm.sub.tail
      • asm.section.sub -> asm.sub.section
      • asm.var.subonly -> asm.sub.varonly
      • asm.regsub -> asm.sub.reg
      • asm.relsub -> asm.sub.rel
      • anal.in=raw -> anal.in=range
      • asm.bytespace -> asm.bytes.space
      • scr.ansicon -> scr.vtmode (only on Windows build)
    • New variables/options
      • anal.vars.stackname: (true/false) Name variables based on their offset on the stack
      • asm.bytes.right: (true/false) Display the bytes at the right of the disassembly
      • bin.str.enc=ascii is a new option
  • Commands
    • Add axv and afvx and afv= commands to visualize var R/W accesses
    • Add afvxj to print JSON output of afvx
    • Add dmia command to list all info of a target lib and accept more print modes in dmi
    • Fix invalid json output for drtj command
    • Add key to highlight and go-to highlighted text in graph mode
    • Add JSON print to /E command with /Ej
    • Add zb command to find n closest matching graph zignature
  • Initial refactoring to generate commands help automatically and support argv-style command handlers (e cfg.newshell=true)
  • Add API to print decompiled code
  • Optimize aao objc analysis
  • Display file associated to the current file in the visual title
  • Fix runaway scrolling in Visual mode after mashing down movement key on Windows Terminal
  • Add F9 continue key to ESIL

rafind2

  • Implement rafind2 -F to find the contents of the file

rasign2

  • Add dumping of FLIRT signatures to rasign2
  • Move main code to r_main

r2pm

  • Initial support for git tags in r2pm

Details

More details

This release could not be done without the help of several people, who contributed with many fixes and improvements. Above you can only find some short highlights of what was done in this release, but many more important changes have been committed and you can find them in our git log.

Authors