Difference between pages "Template:MyMon" and "Tutorials/Reverse engineering embedded software using Radare2"

From LCA2015 Delegate wiki
(Difference between pages)
Jump to: navigation, search
m (fixed link)
 
 
Line 1: Line 1:
{| class="wikitable"
+
This page describes preparation for [http://linux.conf.au/schedule/30102/view_talk?day=thursday Reverse engineering embedded software using Radare2]
! style="text-align: center;" | <span class="plainlinks">[http://lca2015.linux.org.au/programme/schedule/monday Mon 12th]</span>
+
 
! style="text-align: center; font-weight: bold;" | Event
+
== Outline ==
! style="text-align: center; font-weight: bold;" | Location
+
 
|-
+
We will try and get through all the following:
| '''09:00-10:00'''
+
 
| Main conference opening
+
* Introduction to Radare2 reverse engineering tool
| [[FPAA]]
+
* The Radare2 utilities
|-
+
* Basics of using the Radare2 reverse engineering to with a binary you probably have on your laptop
| '''10:00-10:40'''
+
* Looking at an arduino binary
| Morning Tea
+
* Introduction to MIPS architecture and assembly
|
+
* Extracting firmware images
|-
+
 
| '''10:40-12:20'''
+
You might like to bring your own binary to play with as well instead!
|
+
 
|
+
== Prerequisites ==
|-
+
 
| '''12:20-13:20'''
+
If you are planning to work through the examples and try your own thing during the session, you really want to get this sorted before the event.
| Lunch
+
 
|
+
Minimum requirements:
|-
+
* a C compiler and libraries needed to build radare2 - the "apt-gettable" version is out of date
| '''13:20-15:00'''
+
* xdot for viewing callgraphs.
|
+
 
|
+
Various other tools may be helpful, and indeed needed (e.g. an editor) to complete some of the examples
|-
+
 
| '''15:00-15:40'''
+
If you are using a Debian-derived distro, for example:
| Afternoon Tea
+
 
|
+
    sudo apt-get install build-essential xdot eog ghex binwalk vim gedit srecord
|-
+
 
| '''15:40-17:20'''
+
It should be possible to build radare2 on Linux, FreeBSD/NetBSD etc, Max OS/X and Windows and possibly on Android if you try hard enough (using a Debian root, for example)
|
+
 
|
+
However, the tutorial examples have only been tested using Debian Wheezy.
|-
+
 
| '''17:30-18:30'''
+
=== Clone & build radare2 ===
|
+
 
|
+
Note, changing to the lca2015_tutorial branch is important, because the software is under active development there could be breakage in master upstream
|-
+
 
| '''18:30-19:30'''
+
    git clone http://github.com/pastcompute/radare2
|
+
    cd radare2
|
+
    git checkout tutorial_branch
|-
+
    ./configure
| '''19:30-20:30'''
+
    make -j
|
+
    sudo make symstall
|
+
 
|-
+
Note, you can install as a normal user if you need to:
| '''Evening'''
+
 
|
+
    ./configure --prefix=$HOME/path/to/wherever
|
+
    make -j
|}<noinclude>[[Category:Schedule Templates]]</noinclude>
+
    sudo make symstall
 +
    export PATH=$HOME/path/to/wherever:$PATH
 +
 
 +
Clone the examples repository
 +
 
 +
    cd
 +
    git clone http://github.com/pastcompute/lca2015-radare2-tutorial
 +
 
 +
==Important - please make an rc file ==
 +
 
 +
Radare2 will by default print fortune cookies. Please, turn this off, in case there is a possibility of NSFW output.
 +
 
 +
    echo 'e cfg.fortunes=false' > ~/.radare2rc
 +
 
 +
 
 +
==Troubleshooting==
 +
 
 +
The tutorial is not until Tuesday Afternoon so if you need help with the above ping me on Twitter : [https://twitter.com/pastcompute @pastcompute]

Revision as of 22:35, 9 January 2015

This page describes preparation for Reverse engineering embedded software using Radare2

Outline

We will try and get through all the following:

  • Introduction to Radare2 reverse engineering tool
  • The Radare2 utilities
  • Basics of using the Radare2 reverse engineering to with a binary you probably have on your laptop
  • Looking at an arduino binary
  • Introduction to MIPS architecture and assembly
  • Extracting firmware images

You might like to bring your own binary to play with as well instead!

Prerequisites

If you are planning to work through the examples and try your own thing during the session, you really want to get this sorted before the event.

Minimum requirements:

  • a C compiler and libraries needed to build radare2 - the "apt-gettable" version is out of date
  • xdot for viewing callgraphs.

Various other tools may be helpful, and indeed needed (e.g. an editor) to complete some of the examples

If you are using a Debian-derived distro, for example:

   sudo apt-get install build-essential xdot eog ghex binwalk vim gedit srecord

It should be possible to build radare2 on Linux, FreeBSD/NetBSD etc, Max OS/X and Windows and possibly on Android if you try hard enough (using a Debian root, for example)

However, the tutorial examples have only been tested using Debian Wheezy.

Clone & build radare2

Note, changing to the lca2015_tutorial branch is important, because the software is under active development there could be breakage in master upstream

   git clone http://github.com/pastcompute/radare2
   cd radare2
   git checkout tutorial_branch
   ./configure
   make -j
   sudo make symstall

Note, you can install as a normal user if you need to:

   ./configure --prefix=$HOME/path/to/wherever
   make -j
   sudo make symstall
   export PATH=$HOME/path/to/wherever:$PATH

Clone the examples repository

   cd
   git clone http://github.com/pastcompute/lca2015-radare2-tutorial

Important - please make an rc file

Radare2 will by default print fortune cookies. Please, turn this off, in case there is a possibility of NSFW output.

   echo 'e cfg.fortunes=false' > ~/.radare2rc


Troubleshooting

The tutorial is not until Tuesday Afternoon so if you need help with the above ping me on Twitter : @pastcompute