1

The Radare community generally seems to look down upon simply running AAA or AAAA claiming that you need to instead learn the fine grained analysis and what they do. However, there seems to be no documentation on this.

Where do I learn what these do? And what that provides to me?

> a~analyze
| aa[?]              analyze all (fcns + bbs) (aa0 to avoid sub renaming)
| a8 [hexpairs]      analyze bytes
| ab[b] [addr]       analyze block at given address
| abb [len]          analyze N basic blocks in [len] (section.size by default)
| ac [cycles]        analyze which op could be executed in [cycles]
| ad[?]              analyze data trampoline (wip)
| ad [from] [to]     analyze data pointers to (from-to)
| ae[?] [expr]       analyze opcode eval expression (see ao)
| af[?]              analyze Functions
| ao[?] [len]        analyze Opcodes (or emulate it)
| as[?] [num]        analyze syscall using dbg.reg

It only gets more scary with aa,

aab - perform basic-block analysis ("Nucleus" algorithm)
aac - analyze function calls from one (selected or current function)
aaf - analyze all function calls
aar - analyze data references
aad - analyze pointers to pointers references

I would just like to see something pull these together. Is there a tutorial on these? It seems like there are hundreds of options providing fine grained control over analysis with little in the way to explain what they deliver shy of the words above.

2

Binary analysis is not a simple thing and it is structured from a lot of different tasks that together might create a heavy and slow task. In order to get the best results, you need to understand what information would you want to know about the binary you are currently working on.

That is true, the radare2 community encouraging its users not always to choose the easy-way of aaa, especially in bing binaries. Alternatively, it suggests that the user would understand what he wants to achieve and will have more control of the analysis.

A detailed answer by me is available on Stack Exchange RE for the question: How to make radare2 work for a large binary?.
There is also a great post about the subject in the radare2 blog: Analysis By Default

For even more detailed explanations, you can always read the code since radare2 is entirely open-source.

  • For the more detailed discovery libr/core/cmd_anal.c is a good starting point. – defragger Nov 16 '18 at 6:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.