Table of Contents

IronForgeCyber

Courses

Resources

Blog

Log In



IronForgeCyber

AboutPrivacyTerms

© 2026 IronForgeCyber. All rights reserved.

  1. resources
  2. radare2
  3. mode-graph

Graph Mode

Graph Mode is a powerful tool for analyzing control flow. This mode allows us to visualize the control flow of a binary in a flowchart. This is useful for understanding how the binary works and how to solve challenges.

Warning
Graph Mode is not Visual Mode.

To enter Graph Mode, use the VV command (or V inside Visual Mode). Use q to leave Graph Mode.

Graph Mode Views

There are 5 views in Graph Mode. These are:

  • Graph View - The main view that shows the flowchart.
  • Graph View + Opcodes - Graph View, showing the address of each instruction.
  • ESIL - Evaluable Strings Intermediate Language. This is a language that radare2 uses to emulate instructions.
  • ESIL + Comments - ESIL, showing the comments for each instruction.
  • Overview - Shows the offsets and primary function calls.
Info
Although this guide doesn't cover ESIL (yet!), it can be a rather useful tool. It's pretty intuitive to understand, and it's useful for understanding how instructions work.

The most common view used is Graph View + Opcodes. Use the p shortcut to cycle through views, and P to cycle in reverse.

radare2
[0x080491af]> 0x80491af # sym.read_in (char *s1);                          ┌──────────────────────────────────────────────┐                          │ [0x80491af]                                  │                          │   ;-- eip:                                   │                          │   ;[x] CALL XREF from main @ 0x804923e(x)    │                          │ 64: sym.read_in (char *s1);                  │                          │ `- args(sp[0x4..0x4])                        │                          │ push ebp                                     │                          │ mov ebp, esp                                 │                          │ sub esp, 8                                   │                          │ sub esp, 8                                   │                          │ ; const char *s2                             │                          │ ; 0x804a011                                  

Graph Mode is very useful for understanding branching. Since it can only show one function at a time, it can be annoying to traverse several function calls. This tool is more useful for static analysis and reverse engineering.

Use the V command while inside Graph Mode to switch the Graph Mode layout. The other layout shows snippets of cross-references from the current function. This is less useful than the default layout, but it's still a useful tool to have.

radare2
[0x080491af]> 0x80491af # sym.read_in (char *s1);                                       ┌────────────────────┐                                       │ [0x80491af]        │                                       └────────────────────┘                                             v   v                                             │   │─────────────────────────────────────────────│   │─────────────────────────────────────────────│   │─────────────────────────────────────────────│   │                                    ┌────────┘   │                                    │            │──────────────────────────────────────────┐                                    │            │──────────────────────────────────────────────────                                    │            └──────────────────────────────────────────────────                                    │                                                       │─────────────────────────┐    ┌──────────────────────────────────────────────────┐    ┌─────────────                         │    │  0x8049196                                       │    │  0x80491edm.read_in @ 0x80491ca(x) │    │   ;[x] CALL XREF from sym.read_in @ 0x80491cc(x) │    │ ; 

Graph Mode Commands

Graph Mode's commands are a bit different from the other modes. These commands are:

  • ↑ ↓ ← →\uparrow\,\downarrow\,\leftarrow\,\rightarrow↑↓←→ - Shift the view around.
  • Tab - Move to the next node.
  • Ctrl + / Ctrl - - Zoom in/out.
  • g<identifier> - Seek to the given identifier.
  • u - Undo the last seek maneuver.
  • s/S - Step in/over the current instruction.

To view the help command window, use the ? shortcut.

│
│ ; "sesame\n" │
│ push str.sesame_n │
│ ; const char *s1 │
│ push dword [s1] │
│ ; int strcmp(const char *s1, const char *s2) │
│ call sym.imp.strcmp;[oa] │
│ add esp, 0x10 │
│ test eax, eax │
│ jne 0x80491d8 │
└──────────────────────────────────────────────┘
f t
│ │
│ └────────────┐
┌──────────┘ │
│ │
┌────────────────────┐ ┌────────────────────────────────────────────────┐
│ 0x80491cc [od] │ │ 0x80491d8 [of] │
│ call sym.win;[oc] │ │ ;[x] CODE XREF from sym.read_in @ 0x80491ca(x) │
│ mov eax, 1 │ │ sub esp, 0xc │
│ jmp 0x80491ed │ │ ; const char *s │
[x]
CODE XR
│ │ 25: sym.win (); │ │ leave
│ │ push ebp │ │ ret
│ │ mov ebp, esp │ └─────────────
│ │ sub esp, 8 │
│ │ sub esp, 0xc │