Difference between pages "Template:CC-BY-SA-3.0" and "Tutorials/Reverse engineering embedded software using Radare2"

From LCA2015 Delegate wiki
(Difference between pages)
Jump to: navigation, search
m (fixed link on image)
 
 
Line 1: Line 1:
<includeonly>{{Licensing Box
+
This page describes preparation for [http://linux.conf.au/schedule/30102/view_talk?day=thursday Reverse engineering embedded software using Radare2]
|This image is licensed under the [[Wikipedia:Creative Commons|Creative Commons]] [http://creativecommons.org/licenses/by-sa/3.0/ Attribution-ShareAlike 3.0 Unported License]. <br>You are free to share and remix the file under the conditions that you appropriately attribute it, and that any derivative or transformative works are distributed only under a license identical to this one. {{#if:{{{1|}}}| <br> Attribution: {{{1|}}} }}
+
|imagel=[[File:CC-Some-Rights-Reserved.png|90px|link=Help:Licensing|Creative Commons License]]<br>[[File:CC-BY.png|24px|Creative Commons Attribution: You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work).]] [[File:CC-SA.png|24px|Creative Commons Share Alike: If you alter, transform, or build upon this work, you may distribute the resulting work only under the same or similar license to this one.]]}}</includeonly><noinclude>[[Category:Licensing Templates]]
+
== Description ==
+
A template for indicating that a particular file [[Special:Upload|uploaded]] to the lca2015 wiki has been licensed using the [[Wikipedia:Creative Commons|Creative Commons]] [http://creativecommons.org/licenses/by-sa/3.0/ Attribution-ShareAlike 3.0 Unported License].
+
  
== Parameters ==
+
== Outline ==
{| class="wikitable"
+
! colspan=3 | Template:CC-BY-SA-3.0
+
|-
+
! Parameter !! Scope !! Description
+
|-
+
| <code>1</code> || optional || First unnamed param. The copyright attribution to display. May contain an external link to the content owner's attribution page.
+
|}
+
  
== Example ==
+
We will try and get through all the following:
=== Basic ===
+
To add this license to a file you have [[Special:Upload|uploaded]] to the wiki, simply add the code below...
+
<pre>{{CC-BY-SA-3.0}}</pre>
+
  
Will display the following infobox on the file's information page...
+
* Introduction to Radare2 reverse engineering tool
 +
* The Radare2 utilities
 +
* Basics of using the Radare to examine a binary you probably have on your laptop
 +
* Looking at an arduino binary
 +
* Introduction to MIPS architecture and disassembly
 +
* Extracting firmware images
  
{{CC-BY-SA-3.0}}
+
You might like to bring your own binary to play with as well instead!
  
=== With Attribution ===
+
==Important - please make an rc file ==
To add this license to a file you have [[Special:Upload|uploaded]] to the wiki, with attribution (including an optional external link), add code similar to below, replacing the wikitext of the parameter with your own attribution information...
+
<pre>{{CC-BY-SA-3.0|This file is my own work and contains no copyrighted elements or derivatives.
+
Please attribute me with a link back to my
+
[https://commons.wikimedia.org/wiki/User:Robert_Frittmann Wikimedia Commons profile]. }}</pre>
+
  
Will display the following infobox on the file's information page...
+
Radare2 was created by other, many people. Radare2 will by default print fortune cookies. Please, turn this feature off, by making the following file, in case there is a possibility of NSFW output.
  
{{CC-BY-SA-3.0|This file is my own work and contains no copyrighted elements or derivatives. Please attribute me with a link back to my [https://commons.wikimedia.org/wiki/User:Robert_Frittmann Wikimedia Commons profile]. }}</noinclude>
+
Instructions for Linux/Unix systems:
 +
 
 +
    echo 'e cfg.fortunes=false' > ~/.radare2rc
 +
 
 +
== Prerequisites ==
 +
 
 +
If during the tutorial you are planning to follow the examples and/or try your own ideas, 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
 +
* binwalk and srecord for firmware hacking
 +
 
 +
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 git 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, ready for use during the tutorial
 +
 
 +
    cd
 +
    git clone http://github.com/pastcompute/lca2015-radare2-tutorial
 +
 
 +
I have already added prebuilt examples to git but there are instructions for building them in git, you will need the arduino IDE or an openwrt buildroot.
 +
 
 +
==Troubleshooting==
 +
 
 +
The tutorial is not until Thursday afternoon. If you need help with the above ping me on Twitter, preferably before the day! [https://twitter.com/pastcompute @pastcompute]

Revision as of 22:35, 10 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 Radare to examine a binary you probably have on your laptop
  • Looking at an arduino binary
  • Introduction to MIPS architecture and disassembly
  • Extracting firmware images

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

Important - please make an rc file

Radare2 was created by other, many people. Radare2 will by default print fortune cookies. Please, turn this feature off, by making the following file, in case there is a possibility of NSFW output.

Instructions for Linux/Unix systems:

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

Prerequisites

If during the tutorial you are planning to follow the examples and/or try your own ideas, 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
  • binwalk and srecord for firmware hacking

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 git 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, ready for use during the tutorial

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

I have already added prebuilt examples to git but there are instructions for building them in git, you will need the arduino IDE or an openwrt buildroot.

Troubleshooting

The tutorial is not until Thursday afternoon. If you need help with the above ping me on Twitter, preferably before the day! @pastcompute