diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 0000000..e69de29 diff --git a/404.html b/404.html new file mode 100644 index 0000000..2cf2203 --- /dev/null +++ b/404.html @@ -0,0 +1,25 @@ + + + + + + + +
+
+
+
+ 4 +
+ +
+ 4 +
+
+
+ Page Not Found +
+
+
+ + diff --git a/CNAME b/CNAME new file mode 100644 index 0000000..e83efb2 --- /dev/null +++ b/CNAME @@ -0,0 +1,6 @@ +angr.io +www.angr.io +angr.re +www.angr.re +angr.horse +www.angr.horse diff --git a/android-icon-144x144.png b/android-icon-144x144.png new file mode 100644 index 0000000..5c86a1a Binary files /dev/null and b/android-icon-144x144.png differ diff --git a/android-icon-192x192.png b/android-icon-192x192.png new file mode 100644 index 0000000..9fe9259 Binary files /dev/null and b/android-icon-192x192.png differ diff --git a/android-icon-36x36.png b/android-icon-36x36.png new file mode 100644 index 0000000..adacab9 Binary files /dev/null and b/android-icon-36x36.png differ diff --git a/android-icon-48x48.png b/android-icon-48x48.png new file mode 100644 index 0000000..bb2de9e Binary files /dev/null and b/android-icon-48x48.png differ diff --git a/android-icon-72x72.png b/android-icon-72x72.png new file mode 100644 index 0000000..c9d9d77 Binary files /dev/null and b/android-icon-72x72.png differ diff --git a/android-icon-96x96.png b/android-icon-96x96.png new file mode 100644 index 0000000..cf35916 Binary files /dev/null and b/android-icon-96x96.png differ diff --git a/api-doc/angr.html b/api-doc/angr.html new file mode 100644 index 0000000..f1a0e21 --- /dev/null +++ b/api-doc/angr.html @@ -0,0 +1,9 @@ + + + Moved + + + +

This page has moved to a https://api.angr.io/angr. Please update your links.

+ + \ No newline at end of file diff --git a/api-doc/archinfo.html b/api-doc/archinfo.html new file mode 100644 index 0000000..446b718 --- /dev/null +++ b/api-doc/archinfo.html @@ -0,0 +1,9 @@ + + + Moved + + + +

This page has moved to a https://api.angr.io/archinfo. Please update your links.

+ + \ No newline at end of file diff --git a/api-doc/claripy.html b/api-doc/claripy.html new file mode 100644 index 0000000..a3a58a3 --- /dev/null +++ b/api-doc/claripy.html @@ -0,0 +1,9 @@ + + + Moved + + + +

This page has moved to a https://api.angr.io/claripy. Please update your links.

+ + \ No newline at end of file diff --git a/api-doc/cle.html b/api-doc/cle.html new file mode 100644 index 0000000..adc5843 --- /dev/null +++ b/api-doc/cle.html @@ -0,0 +1,9 @@ + + + Moved + + + +

This page has moved to a https://api.angr.io/cle. Please update your links.

+ + \ No newline at end of file diff --git a/api-doc/index.html b/api-doc/index.html new file mode 100644 index 0000000..87ccf9c --- /dev/null +++ b/api-doc/index.html @@ -0,0 +1,9 @@ + + + Moved + + + +

This page has moved to a https://api.angr.io. Please update your links.

+ + \ No newline at end of file diff --git a/api-doc/pyvex.html b/api-doc/pyvex.html new file mode 100644 index 0000000..99c7a21 --- /dev/null +++ b/api-doc/pyvex.html @@ -0,0 +1,9 @@ + + + Moved + + + +

This page has moved to a https://api.angr.io/pyvex. Please update your links.

+ + \ No newline at end of file diff --git a/apple-icon-114x114.png b/apple-icon-114x114.png new file mode 100644 index 0000000..af93b9e Binary files /dev/null and b/apple-icon-114x114.png differ diff --git a/apple-icon-120x120.png b/apple-icon-120x120.png new file mode 100644 index 0000000..69a05f9 Binary files /dev/null and b/apple-icon-120x120.png differ diff --git a/apple-icon-144x144.png b/apple-icon-144x144.png new file mode 100644 index 0000000..5c86a1a Binary files /dev/null and b/apple-icon-144x144.png differ diff --git a/apple-icon-152x152.png b/apple-icon-152x152.png new file mode 100644 index 0000000..6ca1723 Binary files /dev/null and b/apple-icon-152x152.png differ diff --git a/apple-icon-180x180.png b/apple-icon-180x180.png new file mode 100644 index 0000000..77ee3c7 Binary files /dev/null and b/apple-icon-180x180.png differ diff --git a/apple-icon-57x57.png b/apple-icon-57x57.png new file mode 100644 index 0000000..5d82caf Binary files /dev/null and b/apple-icon-57x57.png differ diff --git a/apple-icon-60x60.png b/apple-icon-60x60.png new file mode 100644 index 0000000..0079220 Binary files /dev/null and b/apple-icon-60x60.png differ diff --git a/apple-icon-72x72.png b/apple-icon-72x72.png new file mode 100644 index 0000000..c9d9d77 Binary files /dev/null and b/apple-icon-72x72.png differ diff --git a/apple-icon-76x76.png b/apple-icon-76x76.png new file mode 100644 index 0000000..807d8fd Binary files /dev/null and b/apple-icon-76x76.png differ diff --git a/apple-icon-precomposed.png b/apple-icon-precomposed.png new file mode 100644 index 0000000..6df04aa Binary files /dev/null and b/apple-icon-precomposed.png differ diff --git a/apple-icon.png b/apple-icon.png new file mode 100644 index 0000000..6df04aa Binary files /dev/null and b/apple-icon.png differ diff --git a/authors/anton00b/index.html b/authors/anton00b/index.html new file mode 100644 index 0000000..b7f6ef7 --- /dev/null +++ b/authors/anton00b/index.html @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + angr + + + +
+ +

author: anton00b


+ + +
+
+ experimental java, android, and jni support in angr +
+ angr can now symbolically execute Java code and Android apps! +
+
+ +
+
+ + + + diff --git a/authors/conand/index.html b/authors/conand/index.html new file mode 100644 index 0000000..22a5e71 --- /dev/null +++ b/authors/conand/index.html @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + angr + + + +
+ +

author: conand


+ + +
+
+ experimental java, android, and jni support in angr +
+ angr can now symbolically execute Java code and Android apps! +
+
+ +
+
+ + + + diff --git a/authors/degrigis/index.html b/authors/degrigis/index.html new file mode 100644 index 0000000..7407729 --- /dev/null +++ b/authors/degrigis/index.html @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + angr + + + +
+ +

author: degrigis


+ + +
+
+ symbion: fusing concrete and symbolic execution +
+ Learn how to symbolically execute real-world binaries by fusing concrete and symbolic execution +
+
+ +
+
+ + + + diff --git a/authors/index.html b/authors/index.html new file mode 100644 index 0000000..04c4cc9 --- /dev/null +++ b/authors/index.html @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + angr + + + +
+ +

author:


+ + +
+
+ anton00b +
+ +
+
+ + +
+
+ conand +
+ +
+
+ + +
+
+ phate +
+ +
+
+ + +
+
+ degrigis +
+ +
+
+ + +
+
+ r0rshark +
+ +
+
+ + +
+
+ subwire +
+ +
+
+ + +
+
+ lockshaw +
+ +
+
+ + +
+
+ zardus +
+ +
+
+ +
+
+ + + + diff --git a/authors/lockshaw/index.html b/authors/lockshaw/index.html new file mode 100644 index 0000000..8eaea82 --- /dev/null +++ b/authors/lockshaw/index.html @@ -0,0 +1,133 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + angr + + + +
+ +

author: lockshaw


+ + +
+
+ angr 8 release +
+ Python 3 migration, Clemory refactor, CFGFast optimization, and more +
+
+ + +
+
+ throwing a tantrum, part 4: vex and gymrat +
+ Get a workout translating BrainFuck into the VEX intermediate representation +
+
+ + +
+
+ throwing a tantrum, part 3: loaders +
+ Learn to go from a file on disk to angr through the magic of loaders +
+
+ + +
+
+ throwing a tantrum, part 2: architectures +
+ Teach angr the basics of the BrainFuck architecture through archinfo +
+
+ + +
+
+ throwing a tantrum, part 1: angr internals +
+ Learn the basics of how angr works and how to extend angr to support new architectures +
+
+ + +
+
+ throwing a tantrum +
+ Learn how to extend angr in this n+1 part tutorial! +
+
+ + +
+
+ angr blog starting up again +
+ After a year inactive, we're back! Join us for tutorials, examples, and announcements in 2018! +
+
+ +
+
+ + + + diff --git a/authors/phate/index.html b/authors/phate/index.html new file mode 100644 index 0000000..88560db --- /dev/null +++ b/authors/phate/index.html @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + angr + + + +
+ +

author: phate


+ + +
+
+ experimental java, android, and jni support in angr +
+ angr can now symbolically execute Java code and Android apps! +
+
+ +
+
+ + + + diff --git a/authors/r0rshark/index.html b/authors/r0rshark/index.html new file mode 100644 index 0000000..00aa961 --- /dev/null +++ b/authors/r0rshark/index.html @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + angr + + + +
+ +

author: r0rshark


+ + +
+
+ symbion: fusing concrete and symbolic execution +
+ Learn how to symbolically execute real-world binaries by fusing concrete and symbolic execution +
+
+ +
+
+ + + + diff --git a/authors/subwire/index.html b/authors/subwire/index.html new file mode 100644 index 0000000..4aa4e58 --- /dev/null +++ b/authors/subwire/index.html @@ -0,0 +1,133 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + angr + + + +
+ +

author: subwire


+ + +
+
+ symbion: fusing concrete and symbolic execution +
+ Learn how to symbolically execute real-world binaries by fusing concrete and symbolic execution +
+
+ + +
+
+ throwing a tantrum, part 4: vex and gymrat +
+ Get a workout translating BrainFuck into the VEX intermediate representation +
+
+ + +
+
+ throwing a tantrum, part 3: loaders +
+ Learn to go from a file on disk to angr through the magic of loaders +
+
+ + +
+
+ throwing a tantrum, part 2: architectures +
+ Teach angr the basics of the BrainFuck architecture through archinfo +
+
+ + +
+
+ throwing a tantrum, part 1: angr internals +
+ Learn the basics of how angr works and how to extend angr to support new architectures +
+
+ + +
+
+ throwing a tantrum +
+ Learn how to extend angr in this n+1 part tutorial! +
+
+ + +
+
+ angr blog starting up again +
+ After a year inactive, we're back! Join us for tutorials, examples, and announcements in 2018! +
+
+ +
+
+ + + + diff --git a/authors/zardus/index.html b/authors/zardus/index.html new file mode 100644 index 0000000..9cbbe4a --- /dev/null +++ b/authors/zardus/index.html @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + angr + + + +
+ +

author: zardus


+ + +
+
+ angr's new year resolutions +
+ After a busy 2016, angr is ready to make some new year resolutions! +
+
+ +
+
+ + + + diff --git a/blog/angr_blog_starting_up_again/index.html b/blog/angr_blog_starting_up_again/index.html new file mode 100644 index 0000000..7af7ca3 --- /dev/null +++ b/blog/angr_blog_starting_up_again/index.html @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + angr + + + +
+ +

angr blog starting up again

+ +
+ + + Posted in + + + + announcements + + + + + testing + + + + +  by + + + + lockshaw + + + + + subwire + + + +
+ + +
+

Like most New Year resolutions, we did a pretty terrible job of continuing to post on the angr blog throughout 2017. +We learned from this, so this time we’re making an May resolution and bringing the angr blog back!

+

We know that angr can be pretty unapproachable and that while we have examples, +they’re generally a little short on the thought process that underlies our solutions. +On this blog, we’ll be posting many examples with abundant explanation, announcements and tutorials covering new angr +features, and in-depth looks at parts of angr you’ve never though about before. +To get you all started, we have a tutorial on extending angr to new architectures through gymrat plugins and more! +If you’ve ever wanted to use angr to symbolically execute MSP430, Xtensa, BPF, cLEMENCy, +or even Brainfuck (gasp! Not BrainFuck!), then it’s definitely worth giving it a read! +You can find links to each of the tutorial pages here.

+

If you have any suggestions for articles or questions for the angr team, please reach out on our slack! +You can request an invitation here. +For more information on how you can contact us and get involved with the angr project, see here.

+ +
+ +
+
+ + + + diff --git a/blog/angr_symbion/index.html b/blog/angr_symbion/index.html new file mode 100644 index 0000000..100ab8d --- /dev/null +++ b/blog/angr_symbion/index.html @@ -0,0 +1,405 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + angr + + + +
+ +

symbion: fusing concrete and symbolic execution

+ +
+ + + Posted in + + + + announcements + + + + + symbion + + + + +  by + + + + degrigis + + + + + subwire + + + + + r0rshark + + + +
+ + +
+

Today we are going to talk about an exciting new feature that we have recently released on angr’s master: Symbion, a brand new exploration technique aimed to overcome some of the complexities that real-world programs exhibit and that can’t or are not currently modeled in our symbolic engine.

+

Before moving on the interesting details remember: if you use Symbion in your research please cite the paper! :D

+

Motivation

+

When we leverage a symbolic execution tool such as angr to analyze a program, we depend on a model of the operating system and libraries to make the analysis tractable ( in fact trying to symbolically execute everything would lead immediately to a state explosion). +However, there are a lot of libraries and system calls out there, and we cannot hope to model them all. In the case that a program requires an unmodeled procedure, we generally either lose precision, encounter state explosion or spend a lot of time developing a SimProcedure. For real-world programs, this can become a huge barrier to a useful analysis.

+

Instead of modeling, Symbion levereges a concrete execution of a program to support the symbolic analysis.

+

Analysts may wish to symbolically reason about control flow of a program between two program points B and C, but can’t even execute from point A to point B due to unmodeled behaviors. With Symbion, they can execute concretely up to point B, switch into angr’s symbolic context, and compute the program input needed to reach point C. The solution obtained by angr can then be written into the program’s memory and by resuming the concrete execution reaching beyond point C.

+
+ Symbion workflow: + +
+ +

In academia, previous works have explored similar ideas with projects like Mayhem, AVATAR and S2E. We leverege some of the interesting ideas implemented in these projects with the aim of making a hybrid concrete/symbolic approach that is easy to use and flexible enough to build upon.

+

Our main design goals are:

+
    +
  1. +

    Couple the concrete environment to the symbolic environment, without depending on what the concrete environment is and letting users to implement new ConcreteTarget ( the object responsible to control the concrete execution of the program in the concrete environment ) through a well-defined and simple interface.

    +
  2. +
  3. +

    Allow context switches between concrete and symbolic (and vice versa), without expensive transfers of state.

    +
  4. +
  5. +

    Allow changes to the concrete state, to enable further exploration based on the results of angr analyses.

    +
  6. +
+

With these goals in mind, we have worked to create Symbion, while minimizing the changes to the overall angr environment and workflow.

+

System overview

+
+ Symbion main components: + +
+ +

The first thing we need to do when performing an analysis is creating the concrete environment we wish to use. Symbion adds the notion of a ConcreteTarget, a generic abstraction for any execution environment that defines simple memory, register, and execution control interactions.

+

For example, to connect to a gdbserver:

+
from angr_targets import AvatarGDBConcreteTarget
+
+# Start a gdbserver instance
+subprocess.Popen("gdbserver %s:%s %s" % (GDB_SERVER_IP,GDB_SERVER_PORT,'/bin/ls'),
+                  stdout=subprocess.PIPE,
+                  stderr=subprocess.PIPE, shell=True)
+
+# Instantiation of the AvatarGDBConcreteTarget
+avatar_gdb = AvatarGDBConcreteTarget(avatar2.archs.x86.X86_64, GDB_SERVER_IP,
+                                    GDB_SERVER_PORT)
+

While here we use a GDB concrete target, it is totally possible to implement new targets ( like full-system emulators, hardware via an attached debugger, a Windows debugger,… ) by implementing a very simple interface:

+
   # read 'length' bytes from address in the concrete process memory
+   def read_memory(self, address, length, **kwargs):
+
+   # write 'data' at 'address' inside the concrete process memory
+   def write_memory(self, address, data, **kwargs):
+
+   # read specified 'register' data
+   def read_register(self, register, **kwargs):
+
+   # write 'value' inside specified 'register'
+   def write_register(self, register, value, **kwargs):
+
+   # set a breakpoint at 'address'
+   def set_breakpoint(self, address, **kwargs):
+
+   # remove breakpoint at 'address'
+   def remove_breakpoint(self, address, **kwargs):
+
+   # get information about memory mapping of the target process
+   def get_mappings(self):
+
+   # resume the execution of the concrete process
+   def run(self):
+
+   # force stop of the concrete execution
+   def stop(self):
+

The attentive reader may notice that this API bears a striking similarity to the interface used by the AVATAR target-orchestration framework; this is intentional, and we inherit target code and capabilities from AVATAR’s collection of pluggable targets.

+

Next, we need to create the angr environment. This is done in the usual way, but specifying that a ConcreteTarget is to be used:

+
# Creating an angr Project by specifying that we are going to use a concrete target
+p = angr.Project(binary_x64, concrete_target=avatar_gdb,
+                 use_sim_procedures=True)
+

The primary user-facing component of Symbion is its ExplorationTechnique, which works similarly to the other available techniques. This allows us to execute the program until a certain address is reached, or any number of other conditions.

+

Translating this idea into the script, let’s say we want to reach 0x4007a4:

+
# Create the state at the beginning of the program
+entry_state = p.factory.entry_state()
+entry_state.options.add(angr.options.SYMBION_SYNC_CLE)
+entry_state.options.add(angr.options.SYMBION_KEEP_STUBS_ON_SYNC)
+
+# Create a simulation manager to hold this exploration
+simgr = p.factory.simgr(entry_state)
+
+# Explore the program concretely until we reach 0x4007a4
+simgr.use_technique(angr.exploration_techniques.Symbion(find=[0x4007A4]))
+
+exploration = simgr.run()
+

While this seems simple, a lot of the complexity of Symbion is hidden in the transition between the concrete and the symbolic contexts. +The whole magic occurs through a new angr execution engine (SimEngineConcrete) and an accompanying Concrete state plugin ( these are complex enough to warrant their own blog post and will be discussed later ). +For now, it suffices to say that at the end of its execution (when we have reached the target address), the SimEngineConcrete returns a SimState reflecting the current state of the concrete target.

+
+ Interaction with ConcreteTarget: + +
+ +

However, this synchronization does not need to copy any memory; during the synchronization with the concrete target, we modify the state’s memory backend such that reads are lazily redirected to the underlying concrete memory.

+
+ Lazy memory redirection: + +
+ +

We are again free to perform any analysis we wish. Note that while this state forwards memory reads to the underlying concrete target, writes are not forwarded, and will remain only in this symbolic state, until they are concretized and applied to the target. +Concretization is triggered by the use of the concretize argument passed to Symbion. We only need to supply a list of addresses, and the variable we wish to solve for.

+
# Instructing angr to use the Symbion exploration technique to bring the
+# concrete process to the address 'BINARY_EXECUTION_END'
+simgr.use_technique(angr.exploration_techniques.Symbion(find=[BINARY_EXECUTION_END],
+                                  memory_concretize = [(address,my_variable)]))
+

Example

+

For this example, we are going to use a homemade toy binary (a 64-bit Linux ELF) that will make decisions about the execution based on an internal hardcoded configuration. +The binary has also been packed with UPX in order to hinder as much as possible the analysis with angr.

+

Disclaimer: this homemade “malware” is definitely not a real-world case scenario, but its level of complexity is perfectly suited for showing how Symbion works. We are planning to show you real-world cases in future blog posts!

+

Before starting make sure you cloned the angr-targets and you installed it in your python virtualenv.

+

Let’s begin! :D

+

First thing first, let’s get familiar with our binary. +You can get a [copy](https://github.com/angr/binaries.git in tests/x86_64/packed_elf64) from the angr binaries repository

+

By executing it, you have a surprise:

+
[+] Parsing malware configuration
+[+] Virtual environment detected!
+
+

Seems that we have an evasive behavior here! +We leave the reversing of the binary and the discovering of its original entry point (OEP) as an exercise to the reader, but for the sake of our example, we’ll spoil it: 0x400b95. +We then execute the binary until we reach the OEP, using the procedure outlined above, and construct the control-flow graph of the unpacked binary. +By looking at the CFG at the OEP we can easily see 4 possible behaviors of the binary:

+
+ Malware CFG and its behaviors: + +
+ +

All this behavior depends on the hardcoded configuration mentioned at the beginning. We can spot the usage of this configuration at the address 0x400cd6: the point where the first decision is taken from the binary. +Seems that with the default hardcoded configuration we are following the yellow path!

+
+ Default behavior with current configuration: + +
+ +

Now, as analysts, our job here is to study this binary’s malicious behavior, and how it is triggered. We see some nasty secondary payload dropped starting in the basic block at 0x400d6a; how do we get there? And what about the basic block 0x400d99? Well, this is what symbolic execution is good for!

+

The idea is to let the binary unpack itself and reach concretely the position where the first decision is taken ( the address 0x400cd6 ), synchronize the state inside angr, define as symbolic the configuration buffer, explore symbolically and resume the program as we whish given the solution provided by angr!

+

However, this binary is packed, and the memory there will be overwritten by the unpacking process. Software breakpoints, like the ones used by GDB, will be overwritten as well. +Instead, we manually reverse-engineer the binary and determine that we can execute from the beginning of the program until 0x85b853 to have a new stub available at 0x45b97f and eventually wait for 4 breakpoint hits to this address to have our unpacked code at 0x400cd6.

+

Let’s put this into code!

+
import subprocess
+import os
+import nose
+import avatar2 as avatar2
+
+import angr
+import claripy
+from angr_targets import AvatarGDBConcreteTarget
+
+
+# First set everything up
+binary_x64 = os.path.join(os.path.dirname(os.path.realpath(__file__)),
+                                          os.path.join('..', '..', 'binaries',
+                                          'tests','x86_64',
+                                          'packed_elf64'))
+
+# Spawning of the gdbserver analysis environment
+print("gdbserver %s:%s %s" % (GDB_SERVER_IP,GDB_SERVER_PORT,binary_x64))
+subprocess.Popen("gdbserver %s:%s %s" % (GDB_SERVER_IP,GDB_SERVER_PORT,binary_x64),
+                  stdout=subprocess.PIPE,
+                  stderr=subprocess.PIPE,
+                  shell=True)
+
+# Instantiation of the AvatarGDBConcreteTarget
+avatar_gdb = AvatarGDBConcreteTarget(avatar2.archs.x86.X86_64,
+                                     GDB_SERVER_IP, GDB_SERVER_PORT)
+
+# Creation of the project with the new attributes 'concrete_target'
+p = angr.Project(binary_x64, concrete_target=avatar_gdb,
+                             use_sim_procedures=True)
+
+entry_state = p.factory.entry_state()
+entry_state.options.add(angr.options.SYMBION_SYNC_CLE)
+entry_state.options.add(angr.options.SYMBION_KEEP_STUBS_ON_SYNC)
+
+simgr = p.factory.simgr(state)
+
+## Now, let's the binary unpack itself
+simgr.use_technique(angr.exploration_techniques.Symbion(find=[0x85b853]))
+exploration = simgr.run()
+new_concrete_state = exploration.stashes['found'][0]
+
+# Hit the new stub 4 times before having our unpacked code at 0x400cd6
+for i in xrange(0,4):
+    simgr = p.factory.simgr(new_concrete_state)
+    simgr.use_technique(angr.exploration_techniques.Symbion(find=[0x85b853]))
+    exploration = simgr.run()
+    new_concrete_state = exploration.stashes['found'][0]
+
+## Reaching the first decision point
+simgr = p.factory.simgr(new_concrete_state)
+simgr.use_technique(angr.exploration_techniques.Symbion(find=[0x400cd6])
+exploration = simgr.run()
+new_concrete_state = exploration.stashes['found'][0]
+

Now the new_concrete_state is synchronized with the program’s state at 0x400cd6. +To start to explore symbolically the program we should declare as symbolic the portion of memory that hosts the hardcoded configuration used by the malware. +We have identified this previously at the address resolved by the operation rbp-0xc0.

+
+ Address of the hardcoded configuration: + +
+ +

Let’s leverage this info to declare such portion of memory symbolic!

+
# Declaring a symbolic buffer
+arg0 = claripy.BVS('arg0', 8*32)
+
+# The address of the symbolic buffer would be the one of the
+# hardcoded malware configuration
+symbolic_buffer_address = new_concrete_state.regs.rbp-0xc0
+
+# Setting the symbolic buffer in memory!
+new_concrete_state.memory.store(symbolic_buffer_address, arg0)
+

Time for some symbolic execution to find the value of the configuration to trigger the dropper behavior of this toy sample. ( for the sake of clarity let’s use tag instead of raw addresses ) +Also, we are going to instruct angr to specifically avoid, during the symbolic exploration, part of the binary that are related to evasion or behaviors that not interesting for this analysis.

+
simgr = p.factory.simgr(new_concrete_state)
+
+print("[2]Symbolically executing binary to find dropping of second stage" +
+       "[ address:  " + hex(DROP_STAGE2_V2) + " ]")
+
+# Symbolically explore the malware to find a specific behavior by avoiding
+# evasive behaviors
+exploration = simgr.explore(find=DROP_STAGE2_V2, avoid=[DROP_STAGE2_V1,
+                                                       VENV_DETECTED, FAKE_CC ])
+# Get our synchronized state back!
+new_symbolic_state = exploration.stashes['found'][0]
+

Last step: now that we hold the value of the configuration to trigger that action in the binary, let’s concretize it in the memory of the concrete execution and let’s enjoy the triggering of our chosen behavior!

+
print("[3]Executing binary concretely with solution found until the end " +
+hex(BINARY_EXECUTION_END))
+
+simgr = p.factory.simgr(new_symbolic_state)
+
+# Concretizing the solution to reach the interesting behavior in the memory
+# of the concrete process and resume until the end of the execution.
+simgr.use_technique(angr.exploration_techniques.Symbion(find=[BINARY_EXECUTION_END],
+                              memory_concretize = [(symbolic_buffer_address,arg0)], 
+                              register_concretize=[]))
+
+exploration = simgr.run()
+
+new_concrete_state = exploration.stashes['found'][0]
+
+

Here we are making use of the concretize attribute of the Symbion exploration technique to overwrite that address in the memory of the concrete process with the value held in arg0 that is the solution found with the symbolic execution. By resuming the concrete process now we should see the program dropping the second stage:

+
[+]Parsing malware configuration
+[+]Executing stage 2 fake malware V2
+
+

Extras

+

Timeout the concrete execution

+

The Symbion ExplorationTechnique supports the addition of a timeout to the concrete execution; this come handful in cases where you don’t hit one of the expected breakpoints and the program keeps running or if hitting one of the breakpoints take a while and you want to be sure that you didn’t miss your shot. +In these cases, after an user defined value for the timeout, we stop the concrete execution ( warning: the ConcreteTarget implementation must implement the stop method properly ) and angr returns the synchronized state in the timeout stash.

+

+#[...]
+
+# specifying a timeout for the concrete execution ( in seconds )
+simgr.use_technique(angr.exploration_techniques.Symbion(find=[BINARY_EXECUTION_END],
+                              timeout = 10))
+
+exploration = simgr.run()
+
+new_concrete_timeout_state = exploration.stashes['timeout'][0]
+
+

At this point by investigating the returned state, users can decide to resume the execution again and wait longer or just aborting the analysis or do whatever they want!

+

Restoring SimProcedures

+

If you’ve decided to use SimProcedures during the declaration of the angr’s Project:

+
# Creation of the project with the new attributes 'concrete_target'
+p = angr.Project(binary_x64, concrete_target=avatar_gdb,
+                             use_sim_procedures=True)  # <---- Using SimProcedures
+

The Concrete state plugin tries to update their addresses in the angr’s internal SimProcedures table ( i.e. p._sim_procedures ) in order to avoid to execute libraries code that can sometimes get the VEX engine in troubles ( e.g. dirty calls not implemented ) or lead to a early state explosion.

+

Future Works

+

The current version of Symbion is a very basic implementation of the interesting concept of mixing concrete and symbolic execution to support analysis of very complex target. We have plenty of exciting ideas to push this project:

+
    +
  1. Support for a snapshot engine that empowers user to restore a specific state of the concrete process.
  2. +
  3. Support for a watchpoint mechanism to support the stopping of the concrete execution as soon as it touches a symbolic defined portion of memory.
  4. +
  5. Exciting real world demos! :-)
  6. +
+

Conclusions

+

The presented example showed how we leverage Symbion to discover the malware configuration that eventually trigger a specific action of interest in the binary. We accomplished that by strategically skipping the initial phase of malware unpacking delegating its execution to the concrete environment, then we synchronized the state of the unpacked program inside angr and by declaring part of memory symbolic and levereging symbolic execution we discover the correct value to avoid the malware evasion and trigger the dropping of the second stage.

+

The flexibility of the designed interface should open the door to different implementations of ConcreteTargets and the building of new tools that will let analysts to combine these concrete and symbolic analyses in new and exciting ways.

+

We think that this new primitive will let us explore new execution method of very complex target +and give space to new ideas regarding the exploitation of symbolic execution for real world +programs. We are excited to release this to the community, to see how you all will use angr to +push the boundaries of program analysis even further.

+

Stay tuned for more example and updates about the project!

+

Citations

+

@inproceedings{gritti2020symbion, +author = {Gritti, Fabio and Fontana, Lorenzo and Gustafson, Eric and Pagani, Fabio and Continella, Andrea and Kruegel, Christopher and Vigna, Giovanni}, +booktitle = {Proceedings of the IEEE Conference on Communications and Network Security (CNS)}, +month = {June}, +title = {SYMBION: Interleaving Symbolic with Concrete Execution}, +year = {2020} +}

+ +
+ +
+
+ + + + diff --git a/blog/index.html b/blog/index.html new file mode 100644 index 0000000..9ee3808 --- /dev/null +++ b/blog/index.html @@ -0,0 +1,159 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + angr + + + +
+ + + +
+
+ experimental java, android, and jni support in angr +
+ angr can now symbolically execute Java code and Android apps! +
+
+ + +
+
+ symbion: fusing concrete and symbolic execution +
+ Learn how to symbolically execute real-world binaries by fusing concrete and symbolic execution +
+
+ + +
+
+ angr 8 release +
+ Python 3 migration, Clemory refactor, CFGFast optimization, and more +
+
+ + +
+
+ throwing a tantrum, part 4: vex and gymrat +
+ Get a workout translating BrainFuck into the VEX intermediate representation +
+
+ + +
+
+ throwing a tantrum, part 3: loaders +
+ Learn to go from a file on disk to angr through the magic of loaders +
+
+ + +
+
+ throwing a tantrum, part 2: architectures +
+ Teach angr the basics of the BrainFuck architecture through archinfo +
+
+ + +
+
+ throwing a tantrum, part 1: angr internals +
+ Learn the basics of how angr works and how to extend angr to support new architectures +
+
+ + +
+
+ throwing a tantrum +
+ Learn how to extend angr in this n+1 part tutorial! +
+
+ + +
+
+ angr blog starting up again +
+ After a year inactive, we're back! Join us for tutorials, examples, and announcements in 2018! +
+
+ + +
+
+ angr's new year resolutions +
+ After a busy 2016, angr is ready to make some new year resolutions! +
+
+ +
+
+ + + + diff --git a/blog/java_angr/index.html b/blog/java_angr/index.html new file mode 100644 index 0000000..f10fef2 --- /dev/null +++ b/blog/java_angr/index.html @@ -0,0 +1,338 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + angr + + + +
+ +

experimental java, android, and jni support in angr

+ +
+ + + Posted in + + + + announcements + + + + + tutorial + + + + + extending angr + + + + + java + + + + + android + + + + +  by + + + + anton00b + + + + + conand + + + + + phate + + + +
+ + +
+

angr can now symbolically execute Java code and Android apps, including Android apps incorporating both compiled Java and native (C/C++) code!

+

This project is the result of a multi-year effort by (in no particular order): Thorsten Eisenhofer (thrsten), Sebastiano Mariani (phate), Ruoyu Wang (fish), Antonio Bianchi (anton00b), and Andrea Continella (conand).

+

Enabling Java support requires a few more steps than a typical angr installation. +To get started, we recommend looking through the detailed installation instructions and a list of examples available in the official angr documentation.

+

WARNING: Java support is still experimental! +You may encounter issues while analyzing Java or Android apps. Please report any bugs on the respective git repository in the angr project. Pull requests are also welcome!

+

Implementation

+
+ Pysoot Architecture: + +
+ +

Java support relies primarily on our new Soot python wrapper, pysoot, to lift both Java and DEX bytecode. +pysoot lifts both Java and DEX bytecode, as well as extracts a fully serializable interface from Android apps and Java code. +Unfortunately, as of now, it only works on Linux.

+

We then leverage the generated IR in a new angr engine able to interpret such code. +This engine is also able to automatically switch to executing native code if a native method is called through the JNI interface.

+

Along with symbolic execution, we have also implemented some basic static analysis, specifically a basic CFG reconstruction analysis. +Moreover, we added support for string constraint solving by integrating CVC4’s string constraint abilities into claripy.

+

Solving a CTF challenge

+

The challenge javaisnotfun from iCTF 2017 is a game implemented in mixed Java/C code. +You can find its source code here and a writeup (in Chinese) here.

+

The challenge starts with a challenge-response game in which 5 random numbers are shown to the user, and the user has to reply with 3 numbers. +Solving five rounds of the game allows the attacker to trigger the challenge vulnerability.

+

In this example, we will focus on how to solve one round of the game using angr. +The complete angr code is available here.

+

A typical approach would require reversing the Java code and the native code used to implement the game. +However, we can now use angr to automatically compute the 3 numbers of the solution!

+

This is the source code implementing one round of the game:

+
Random rnd = new Random();
+int c1,c2,c3,c4,c5;
+c1 = rnd.nextInt(100);
+c2 = rnd.nextInt(100);
+c3 = rnd.nextInt(256);
+c4 = rnd.nextInt(10);
+c5 = rnd.nextInt(10);
+print("These are your unlucky numbers:");
+print(c1);
+print(c2);
+print(c3);
+c3 <<= 8;
+
+switch(c4){
+case 0:
+  c3 = c3 * 2 + 3;
+  break;
+case 1:
+  c3 = c3 * 7 + 8;
+  break;
+case 2:
+  c3 = c3 * 3 + 1;
+  break;
+case 3:
+  c3 = c3 * 5 + 3;
+  break;
+case 4:
+  c3 = c3 * 2 + 9;
+  break;
+case 5:
+  c3 = c3 * 9 + 1;
+  break;
+case 6:
+  c3 = c3 * 6 + 2;
+  break;
+case 7:
+  c3 = c3 * 5 + 4;
+  break;
+case 8:
+  c3 = c3 * 8 + 2;
+  break;
+case 9:
+  c3 = c3 * 4 + 2;
+  break;
+}
+switch(c5){
+case 0:
+  c3 = magic0(c3);
+  break;
+case 1:
+  c3 = magic1(c3);
+  break;
+case 2:
+  c3 = magic2(c3);
+  break;
+case 3:
+  c3 = magic3(c3);
+  break;
+case 4:
+  c3 = magic4(c3);
+  break;
+case 5:
+  c3 = magic5(c3);
+  break;
+case 6:
+  c3 = magic6(c3);
+  break;
+case 7:
+  c3 = magic7(c3);
+  break;
+case 8:
+  c3 = magic8(c3);
+  break;
+case 9:
+  c3 = magic9(c3);
+  break;
+}
+print(c4);
+print(c5);
+
+//System.err.println("expected: " + String.valueOf(c1+2)+"|"+String.valueOf(c2*3+1)+"|"+String.valueOf(c3));
+if(! (getInt() == c1 + 2)){
+  gameFail();
+}
+if(! (getInt() == magic000(c2))){
+  gameFail();
+}
+if(! (getInt() == c3)){
+  gameFail();
+}
+
JNIEXPORT int JNICALL Java_NotFun_magic000(JNIEnv *env, jobject thisObj, jint n) {
+   return n*3 + 1;
+}
+JNIEXPORT int JNICALL Java_NotFun_magic0(JNIEnv *env, jobject thisObj, jint n) {
+   return (n<<1) + 4;
+}
+JNIEXPORT int JNICALL Java_NotFun_magic1(JNIEnv *env, jobject thisObj, jint n) {
+   return (n<<4) + 3;
+}
+JNIEXPORT int JNICALL Java_NotFun_magic2(JNIEnv *env, jobject thisObj, jint n) {
+   return (n<<3) + 2;
+}
+JNIEXPORT int JNICALL Java_NotFun_magic3(JNIEnv *env, jobject thisObj, jint n) {
+   return (n<<2) + 3;
+}
+JNIEXPORT int JNICALL Java_NotFun_magic4(JNIEnv *env, jobject thisObj, jint n) {
+   return (n<<2) + 1;
+}
+JNIEXPORT int JNICALL Java_NotFun_magic5(JNIEnv *env, jobject thisObj, jint n) {
+   return (n>>2) + 3;
+}
+JNIEXPORT int JNICALL Java_NotFun_magic6(JNIEnv *env, jobject thisObj, jint n) {
+   return (n>>3) + 3;
+}
+JNIEXPORT int JNICALL Java_NotFun_magic7(JNIEnv *env, jobject thisObj, jint n) {
+   return (n>>1) + 3;
+}
+JNIEXPORT int JNICALL Java_NotFun_magic8(JNIEnv *env, jobject thisObj, jint n) {
+   return (n>>4) + 7;
+}
+JNIEXPORT int JNICALL Java_NotFun_magic9(JNIEnv *env, jobject thisObj, jint n) {
+   return (n>>1) + 1;
+}
+

Let’s create, using angr, a function able to compute the 3 response values, given the 5 random challenge values. +First of all we need to create an angr Project.

+
binary_path = os.path.join(self_dir, "bin/service.jar")
+jni_options = {'jni_libs': ['libnotfun.so']}
+project = angr.Project(binary_path, main_opts=jni_options)
+

As you can see, we manually specify that the jar file uses a native library, libnotfun.so. +We then set up a few hooks. +Since these hooks are in Java, we specify their addresses using the class SootMethodDescriptor.

+
project.hook(SootMethodDescriptor(class_name="java.util.Random", name="nextInt", params=('int',)).address(), Random_nextInt())
+project.hook(SootMethodDescriptor(class_name="java.lang.Integer", name="valueOf", params=('int',)).address(), Dummy_valueOf())
+project.hook(SootMethodDescriptor(class_name="NotFun", name="print", params=('java.lang.Object',)).address(), Custom_Print())
+project.hook(SootMethodDescriptor(class_name="NotFun", name="getInt", params=()).address(), Custom_getInt())
+

Then, we set up the symbolic execution entry point. +Specifically, we want to start the symbolic execution from the Java method called game():

+
game_method = [m for m in project.loader.main_object.classes['NotFun'].methods if m.name == "game"][0]
+game_entry = SootMethodDescriptor.from_soot_method(game_method).address()
+entry = project.factory.blank_state(addr=game_entry)
+simgr = project.factory.simgr(entry)
+

To handle the challenge-response, we create two fake files keeping track (symbolically) of what the program prints (the 5 challenge numbers) and what the user inserts (the 3 response values). +See the full solution for details.

+

Finally, we start symbolically executing the program step-by-step. +We prune paths reaching the gameFail() method, while we stash paths solving one round of the game (formally, reaching basic block 30 of the method game()). +When run, numeric_solutions will contain the 3 response values.

+
print("="*10 + " SYMBOLIC EXECUTION STARTED")
+while(len(simgr.active)>0):
+    simgr.step()
+    print("===== " + str(simgr))
+    print("===== " + ",".join([str(a.addr) for a in simgr.active if type(a.addr)==SootAddressDescriptor]))
+
+    # If we reach block_idx 30, it means that we solved 1 round of the game --> we stash the state
+    # If we reach the gameFail() method, it means that we failed --> we prune the state
+    simgr.move('active', 'stashed', lambda a: type(a.addr) == SootAddressDescriptor
+               and a.addr.method == SootMethodDescriptor("NotFun", "game", ()) and a.addr.block_idx == 30)
+    simgr.move('active', 'pruned', lambda a: type(a.addr) == SootAddressDescriptor
+               and a.addr.method == SootMethodDescriptor("NotFun", "gameFail", ()))
+
+print("="*10 + " SYMBOLIC EXECUTION ENDED")
+assert len(simgr.stashed) == 1
+win_state = simgr.stashed[0]
+numeric_solutions = []
+for s in solutions:
+    es = win_state.solver.eval_atmost(s, 2)
+    assert len(es) == 1
+    numeric_solutions.append(es[0])
+

Limitations and Future Work

+

As mentioned before, Java support is experimental!

+

There are many things that should be improved, for instance:

+ +

Contribution from the community is highly encouraged! Pull requests are very welcome!

+ +
+ +
+
+ + + + diff --git a/blog/moving_to_angr_8/index.html b/blog/moving_to_angr_8/index.html new file mode 100644 index 0000000..47f2752 --- /dev/null +++ b/blog/moving_to_angr_8/index.html @@ -0,0 +1,128 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + angr + + + +
+ +

angr 8 release

+ +
+ + + Posted in + + + + release + + + + + angr8 + + + + +  by + + + + lockshaw + + + +
+ + +
+

The angr team is happy to announce the release of a new major version of angr, angr 8! +angr 8 brings a variety of large and potentially breaking improvements, as well as a bunch of smaller bugfixes. +The highlights are listed below, but we also recommend checking the angr 8 section of the Changelog for a list of the major changes and the Migration Guide for help in migrating your project to angr 8.

+

As always, to contact the angr team please reach out on our slack. +You can request an invitation here. +For more information on how to get involved with the angr project, see here.

+

Highlights:

+

Python 3 Migration

+

The largest change in angr 8 is the migration to Python 3. As of angr 8, angr will be dropping all Python 2 support and moving to Python 3. +For now, we will be targeting Python 3.5, with plans to eventually move to 3.6. +The last Python 2-compatible angr release is version 7.8.9.26. +This release pins the version numbers of all its dependencies so it should hopefully work far into the future. +If you need any help migrating your code to Python 3, please see the Migration Guide.

+

Clemory API Refactor

+

With the upgrade to Python 3 come a number of changes to the Clemory API (project.loader.memory) around replacing the Python 2 string type with Python 3’s bytes. +This should make working with Clemory easier, as well as yield significant performance benefits. +We also recommend no longer using the cbackers and read_bytes_c functions, since the improved performance makes them unnecessary. +Except for this, migrating code to use the new API should be relatively easy. +For a detailed explanation of the changes, see the Migration Guide. Thanks to @rhelmot for the refactor!

+

For those interested, the commit with most of the changes can be found here.

+

Up to 5x Speedup in CFGFast

+

Driven by the need to recover the CFG of a large blob, the angr team has significantly improved the performance of CFGFast. +Amongst other things, angr is now able to lift blocks without converting their statements into Python objects, perform more of the analysis in C, and avoid lifting any basic block more than once. +All combined, we’ve seen this give a more than 5x speedup on large binaries! +For changes and benchmarking details, see PR #1092. +Thanks to @KevOrr for the binary that motivated the changes and @ltfish for the optimizations!

+ +
+ +
+
+ + + + diff --git a/blog/new_years_resolutions_2017/index.html b/blog/new_years_resolutions_2017/index.html new file mode 100644 index 0000000..51fe2c7 --- /dev/null +++ b/blog/new_years_resolutions_2017/index.html @@ -0,0 +1,212 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + angr + + + +
+ +

angr's new year resolutions

+ +
+ + + Posted in + + + + announcement + + + + +  by + + + + zardus + + + +
+ + +
+

From academic research to the Cyber Grand Challenge, angr has had a busy 2016! +Now that the angr team is (mostly) back from the holidays, it’s time to plan a busy and successful 2017. +For this year, we are looking at three major areas of improvement: usability, contributability, and applicability.

+

Usability

+

First, we would like to make angr more approachable and usable by the community. +We recognize that, in its current state, angr is very hard to get started with. +Currently, we try to provide documentation (both as prose and as API references, +and examples, but this fails to get across many +of the subtleties of binary analysis in general and angr specifically. +Because of this, much of the power of angr is completely unknown to the community, with a depressing amount of people using angr +just to find and avoid addresses in CTF challenges. +We have a few ideas to make this better:

+
    +
  1. +

    Training: +Last month, we ran an all-day angr tutorial at ACSAC. +The response from this was very positive, and we’ll be looking at more venues to run these sorts of classes. +If you’re interested in this, get in touch!

    +
  2. +
  3. +

    An angr “course”: +Another idea on the TODO list is a course that gradually introduces angr concepts. +Again, we started down this road with the ACSAC tutorial, and some of the +resulting exercises can be reused for a comprehensive course. +This is also something that seems to have community interest, with +contributions beginning to roll in.

    +
  4. +
  5. +

    More blog-post micro-examples: +Many of our examples are CTF challenges. +This is good because it shows angr working in often-adversarial conditions, but it also means that many of the examples are too +confusing. +We plan to make a series of smaller examples, that can be blogged and explained, that demonstrate specific angr features or phi +losophies, similar to Miasm’s and Triton’s blog examples. +Hopefully, this will help new users approach angr without too much pain.

    +
  6. +
  7. +

    Better support channels: +Currently, angr support happens mainly through IRC, GitHub issues, and the mailing list. +Unfortunately, with the way the world has been heading, most of us (shamefully) spend very little time actually looking at our +IRC clients, and instead mostly hang out on various slacks. +In fact, from the very early days of angr, we have had an angr slack for coordination betw +een us all at UCSB. +Now, we are opening this up to the world (to get a slack invite, go here), and making it the prima +ry real-time angr support channel. +We definitely understand that this is going to be a controversial move: people love IRC, and some enjoy other platforms (gitter +, mattermost, etc). +However, the fact is that we’re already on slack, and bringing you to us is going to work better than trying (and likely failin +g) to bring us to you. +As a reminder, slack can be accessed through an +IRC gateway +The freenode #angr channel will continue to exist, but please keep in mind that responses there will be much more hit and miss +than on slack.

    +
  8. +
+

Of course, the limiting factor with usability and support is time. +As a group of students, we have many high-priority demands on our time, and documentation and usability often takes a back seat. +As in the case of the course PR, we hope this time pressure will be partially mitigated by the community.

+

Contributions

+

A second area for us to improve is the ease with which people can make contributions to the project. +Currently, angr development is carried out in two different places: we do development on our internal gitlab infrastructure, and +then periodically synchronize it to GitHub. +With this, until recently, all of our CI testing was done on gitlab. +This made taking PRs very complicated: first, we would have to review all the code (because we’d CI it internally), +then synchronize it to gitlab, then run the CI, then explain to contributors why it failed, and repeat the process again. +This resulted in hugely delayed PR merges. +Additionally, because long-running development branches would happen on gitlab, out of the public eye, the project probably looks +dead for much of the time, with random crazy push activity when we synchronize things. +Worse, during such processes, we would be unable to accept PRs, as it’d cause merging the long-running branch in would +be a nightmare. +In fact, this is currently happening, and many PRs are sitting around until the currently huge development effort +(about which I’ll talk below) concludes.

+

Our plan is to solve this through the following:

+
    +
  1. Moving our testing to TravisCI: +This is currently underway, with most angr sub-projects now being tested on Travis, and more to come. +This will allow us to avoid having to pull in PRs into gitlab for testing, and will give contributors immediate feedback on their PRs.
  2. +
  3. Moving our development to GitHub: +Once testing fully works on TravisCI, we will move our development fully to gitHub. Throughout the last year, we’ve been working to make angr more modular, so that our research can be implemented outside of angr, using angr as an actual framework.
  4. +
+

With this (almost) done, and CI (almost) on Travis, there is (almost) nothing stopping us from developing on GitHub directly.

+

Once we move to GitHub, the PRs can be accepted quickly, and the project continuously looks alive from the outside, +we think (hope) that community enthusiasm and contributions will increase.

+

Applicability

+

Currently, angr is one of the most powerful binary analysis frameworks out there. +We support the 32-bit and 64-bit variants of x86, ARM, MIPS, and PPC, +and offer a range of static analyses along with a powerful symbolic execution engine. +This has allowed angr to be used as the base for an automated ROP generator, +a binary patching engine, +a next-generation fuzzer, +an auto-exploitation engine, +and other exiting stuff.

+

However, we’d like to drive it further.

+

The long-running development branch alluded to earlier is an effort that we’re undertaking +to make angr expandable to other targets. +For example, using LLVM, angr could analyze source code and, using SOOT, Java bytecode. +Additionally, developments in the QEMU world +from rev.ng might allow us to use QEMU’s TCG to expand support to many additional binary platforms. +Essentially, we’re working to make angr more or less independent of the specific backend translation and execution engine used. +We have the following execution engines on our roadmap:

+ +

We’re currently wrapping up the underlying changes (including converting the VEX, hooks, and Unicorn Engine stuff), and they’ll soon be merged (and pushed to GitHub). +Once that’s done, we’ll likely start working on SOOT. +If people are interested in working on some of the other potential engines on the list, let us know!

+

Summary

+

2017 is going to be an exciting year for angr, and we hope you’ll be with us through it all. +Come join us on slack, send some PRs, and let’s usher in the next generation of binary (and more!) analysis.

+ +
+ +
+
+ + + + diff --git a/blog/throwing_a_tantrum_index/index.html b/blog/throwing_a_tantrum_index/index.html new file mode 100644 index 0000000..003db33 --- /dev/null +++ b/blog/throwing_a_tantrum_index/index.html @@ -0,0 +1,127 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + angr + + + +
+ +

throwing a tantrum

+ +
+ + + Posted in + + + + tutorial + + + + + extending angr + + + + + throwing a tantrum + + + + +  by + + + + subwire + + + + + lockshaw + + + +
+ + +
+

Welcome to the Throwing a Tantrum tutorial! +In this n+1-part series, we will be exploring how you can extend angr with new features without editing angr itself. +We’ll be covering a range of topics from gymrat to Analyses, and including a plethora of examples and explanations along the way. +If you’re interested in learning how to port angr to a new architecture, write a custom engine or analysis, or even (gasp) +use angr to analyze BrainFuck programs, then read on.

+ +

For any questions or feedback, please reach out to us on our slack (get an invite here).

+ +
+ +
+
+ + + + diff --git a/blog/throwing_a_tantrum_part_1/index.html b/blog/throwing_a_tantrum_part_1/index.html new file mode 100644 index 0000000..8a5b4df --- /dev/null +++ b/blog/throwing_a_tantrum_part_1/index.html @@ -0,0 +1,198 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + angr + + + +
+ +

throwing a tantrum, part 1: angr internals

+ +
+ + + Posted in + + + + tutorial + + + + + extending angr + + + + + internals + + + + + throwing a tantrum + + + + +  by + + + + subwire + + + + + lockshaw + + + +
+ + +
+

In this n+1-part series, we will be exploring how you can extend angr with new features, without editing angr itself!

+

angr is the popular framework for analyzing binary programs, from embedded firmware, to hardcore CTF challenges, all from the comfort of Python. +angr’s roots lie in the Valgrind VEX instrumentation framework, meaning it benefits from the multi-architecture support and community maintenance. +However, we live in a big world full of crazy things that aren’t Intel or ARM-based Linux machines.

+

What about microcontrollers?

+

What about Android bytecode?

+

What about Javascript?

+

What about BrainFuck??

+

(gasp! Not BrainFuck! Anything but BrainFuck!)

+

If you find yourself asking any of those sorts of questions, this is the guide for you! +angr now supports extensions to each of its core components: the loader, architecture database, lifter, execution engine, and simulated OS layer. +We will be exploring each in turn, with the goal of bringing the complete suite of powerful angr analyses to bear on a totally new class of program that it was not designed to before.

+

In order to not overcomplicate things, and make the core ideas clear, we’re going to start with something conceptually simple.

+

Sorry, that BrainFuck thing was not a joke. +In this guide, we’re going to build the most insanely overkill BrainFuck analysis platform ever constructed. By the time you’re done here, you’ll be able to totally obliterate any of the Brainfuck crack-me programs that I hear may even actually exist.

+

First, let’s go over the components themselves, and how they fit together.

+

The angr lifecycle

+

If you’ve used angr before, you’ve probably done this: +(blatantly stolen from angr-doc’s fauxware example)

+
import angr
+p = angr.Project("crackme")
+state = p.factory.entry_state()
+sm = p.factory.simgr(state)
+sm.step(until=lambda lpg: len(lpg.active) > 1)
+input_0 = sm.active[0].posix.dumps(0)
+

That’s only a few lines, but there’s a whole lot going on here. +In that little snippet, we load a binary, lift it from machine-code to an intermediate representation that we can reason about a bit more mathematically (VEX, by default), execute representation symbolically, and finally, print the input we needed to give the program to get to the first real branch, computed using a SMT-solver.

+
+ the angr lifecycle: + +
+ +

CLE, the loader

+

The first thing that happens when you create an angr project is angr has to figure out what the heck you just told it to load. +For this, it turns to the loader, CLE (CLE Loads Everythig) to come up with an educated guess, extract the executable code and data from whatever format it’s in, take a guess as what architecture it’s for, and create a representation of the program’s memory map as if the real loader had been used. +CLE supports a set of “backends” that service various formats, such as ELF, PE, and CGC. +For the common cases, this means loading an ELF, which brings with it the complicated mess of header parsing, library resolution, and strange memory layouts you both require and expect. +It also supports the exact opposite of this, pure binary blobs, with a backend that just takes the bytes and puts them in the right place in memory. +The result is a Loader object, which has the memory of the main program itself (Loader.main_object) and any libraries.

+

Archinfo, the architecture DB

+

During CLE’s loading, it takes a guess as to what architecture the program is for. +This is usually via either a header (as in ELFs) or some simple heuristic. +Either way, it makes a guess, and uses it to fetch an Arch object from the archinfo package corresponding to it. +This contains a map of the register file, bit width, usual endian-ness, and so on. +Literally everything else relies on this, as you can imagine.

+

SimEngine, the simulated executer

+

Next, angr will locate an execution engine capable of dealing with the code it just loaded. +Engines are responsible for interpreting the code in some meaningful way. +Fundamentally, they take a program’s state– a snapshot of the registers, memory, and so on– do some thing to it, usually a basic block’s worth of instructions, and produce a set of successors, coresponding to all the possible program states that can be reached by executing the current block. +When branches are encountered, they collect constraints on the state which capture the conditions needed to take each path of the branch. +In aggregate, this is what gives angr its reasoning power.

+

PyVEX, the lifter

+

angr’s default engine, SimEngineVEX, supports many architectures, simply because it doesn’t run on their machine code directly. It uses an intermediate representation, known as VEX, which machine code is translated (lifted) into. +As an alternative to creating your own engine for a new architecture, if it is similar enough to a “normal” PC architecture, the faster solution is to simply create a Lifter for it, allowing SimEngineVEX to take care of the rest. +We will explore both Lifters and Engines in this guide.

+

Claripy, the solver

+

Every action an engine performs, even something as simple as incrementing the program counter, is not necessarily an operation on a concrete value. +The value could instead be a complicated expression, that when computed on, should actually result in an even bigger expression. +Creating, composing, and eventually solving these is Claripy’s job. +Claripy uses a SMT-solver, currently Microsoft’s Z3, to do all of this heavy-lifting. +Thankfully, we won’t need to delve into that in this series, as SMT-solving is some serious black magic.

+

SimOS, the rest of the nasty bits

+

If we just view the engine’s work on a program from the states it provides, we’re going to have a lot of work to do to get anything useful out. +Where is stdin? What the heck do I do with files? Network? Are you kidding? +These higher-level abstractions are provided by the OS, and don’t exist at the bare machine level. +Therefore, SimOS' job is to provide all of that to angr, so that it can be reasoned about without all the pain of interpreting just what the fake hardware would do. +Based on a guess from CLE, a SimOS is created (ex. SimLinux), which defines the OS-specific embellishments on the initial state of the program, all its system calls, and convenient symbolic summaries of what syscalls and common library functions do, known as SimProcedures. +These make angr dramatically faster and more compatible, as symbolically executing libc itself is, to say the least, insanely painful.

+

angr, the real deal

+

Finally, with a Loader, an Engine, an Arch, and a SimOS, we can get to work! +All of this is packaged into a Project, and offered to the higher-level analyses, such as Control-flow Graph reconstruction, program slicing, and path-based reasoning, as in the earlier example.

+

In the next part, we’ll introduce our chosen architecture, BrainFuck, and discuss the implementation of additional architectures.

+
+

Image icons made by

+ + +
+ +
+
+ + + + diff --git a/blog/throwing_a_tantrum_part_2/index.html b/blog/throwing_a_tantrum_part_2/index.html new file mode 100644 index 0000000..35eb1be --- /dev/null +++ b/blog/throwing_a_tantrum_part_2/index.html @@ -0,0 +1,186 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + angr + + + +
+ +

throwing a tantrum, part 2: architectures

+ +
+ + + Posted in + + + + tutorial + + + + + extending angr + + + + + archinfo + + + + + throwing a tantrum + + + + +  by + + + + subwire + + + + + lockshaw + + + +
+ + +
+

Since this is a tutorial about extending the core parts of angr, we should start by focusing on how to extend the core-est of core parts: the architecture support! +Pretty much every piece of angr’s suite involves, in some way, specific information about the architecture of the program you’re analyzing. Dealing with all this low-level architecture stuff is part of what makes binaries a pain in the rear to analyze, but angr abstracts most of it away for you in the archinfo class, which is used by everything else to make the code flexible and platform-independent!

+

Before we can talk about how to add a new architecture, let’s talk about our target:

+

Our Arch: BrainFuck.

+

We’re going to implement BrainFuck in angr, because it’s one of the simplest architectures that exists, but yet is far enough from the “real” architectures angr already supports to show off its flexibility.

+

BrainFuck is an esoteric programming language created by Urban Muller to be simple in concept, but really painful to actually use.

+

BrainFuck implements a Turing machine-like abstraction, in which a infinite(ish) tape of symbols contains the program, and another tape of “cells”, holds the program’s state (memory). +Each cell is an unsigned byte, and the cell being referred to by instructions is chosen by the current value of a “pointer”. +BrainFuck’s instruction pointer starts at 0, and the program ends when it moves past the last symbols. +The data pointer starts at cell 0.

+

BrainFuck has only 8 instructions:

+

> - Move the pointer to the right (increment)

+

< - Move the pointer to the left (decrement)

+

+ - Increment the cell under the pointer

+

- - Decrement the cell under the pointer

+

[ - If the value at the pointer is zero, skip forward to the matching ]

+

] - If the value at the pointer is non-zero, skip backward to the matching [

+

. - Output (print to stdout) the cell at the pointer

+

, - Input (get character at stdin) to the cell at ptr

+

Defining our architecture

+

From the description above, we notice a few things:

+ +

This last point is worth some discussion. +In traditional architectures, this is handled by GPIOs, or some complicated mess of peripherals driven by the OS. We have none of that, we just want bytes in and bytes out. We’ll need to help angr out a bit with this one; there are a few possible ways to implement this, but we’re going to explore one that pretends there are mythical system calls to get our bytes in and out. In a “normal” architecture, this means there’s a syscall number in a register somewhere. We’re going to pretend that exists too.

+

archinfo

+

archinfo is the class in the angr suite that holds all of this information. +To create a new arch, you simply make a subclass of archinfo.Arch, and define your registers, their aliases, some info about bit widths and endianess, and so on.

+

Now, let’s lay down some code.

+

First, the boring stuff:

+
from archinfo.arch import Arch
+from archinfo import register_arch
+
+class ArchBF(Arch):
+    def __init__(self, endness="Iend_LE"):
+        super(ArchBF, self).__init__('Iend_LE')
+

We’ll call this arch little endian, since we have to say something, and in this case it doesn’t matter.

+

Next, some simple metadata:

+
        self.bits = 64
+        self.vex_arch = None
+        self.name = "BF"
+

Names are usually all-caps. As I mentioned above, the bit-width here corresponds to the address space and register widths, and we don’t have one defined, so I picked 64. +VEX doesn’t support this arch, so vex_arch is None.

+

Now here’s the register file:

+
        self.registers = {}
+        self.registers["ip"] = (0, 1)
+        self.registers["ptr"] = (1, 1)
+        self.registers["inout"] = (2, 1)
+        self.registers["ip_at_syscall"] = (3, 1)
+

I mentioned the ‘inout’ register, which is our syscall number when picking input vs output. +However, we have another fake register ip_at_syscall, which is used by angr to track syscall-related return behavior. Don’t worry about it, just put it here.

+

You can also assign aliases, like pc for ip.

+
        self.register_names = {}
+        self.register_names[self.registers['ip'][0]] = 'pc'
+        self.register_names[self.registers['ip'][1]] = 'ip'
+        self.ip_offset = self.registers["ip"][0]
+

Various kinds of reasoning need to where the ip is rather explicitly. We set that here too.

+

Finally, we need to tell archinfo about our new arch:

+
register_arch(['bf|brainfuck'], 64, 'any', ArchBF)
+

The first argument is a list of regular expressions that match the name of our architecture. (Note, as of this writing, you can assume input is lowercase). Next, the bit-width of our arch, which is 64. +The third argument is the endness, which can either be “Iend_LE”, “Iend_BE”, or “any”. (these constants come from VEX, if you’re curious) ‘any’ means this Arch will match for either endness.

+

This is used by archinfo.arch_from_id() to look up the Arch for a given set of parameters. Given the various circumstances under which this is needed, we deliberately make this super flexible, and encourage you to make your mappings flexible too.

+

That’s it!

+

This doesn’t do a whole lot yet, but it’s an important first step.

+

We’ll build on this in the next part, where we get angr to load BF programs into its simulated memory.

+ +
+ +
+
+ + + + diff --git a/blog/throwing_a_tantrum_part_3/index.html b/blog/throwing_a_tantrum_part_3/index.html new file mode 100644 index 0000000..ddc2375 --- /dev/null +++ b/blog/throwing_a_tantrum_part_3/index.html @@ -0,0 +1,181 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + angr + + + +
+ +

throwing a tantrum, part 3: loaders

+ +
+ + + Posted in + + + + tutorial + + + + + extending angr + + + + + loader + + + + + cle + + + + + throwing a tantrum + + + + +  by + + + + subwire + + + + + lockshaw + + + +
+ + +
+

Now we’re going to focus on the first actual step in the process of analyzing a program: Figuring out what it even is, and loading it into our system’s memory somehow.

+

CLE: CLE Loads Everything

+

The angr suite uses CLE to load binaries. +It serves as a logical implementation of the Linux loader first and foremost, but supports other OSes and formats through a series of “backends”.

+

CLE is given, by angr, a path to the “main binary”. This is the argument to angr.Project(). +It’s CLE’s job to open it, figure out what it is, figure out what architecture it is (unless the user overrides), figure out where in memory it’s supposed to go, and load any dependencies, such as shared libraries, that it may depend on.

+

Shortcut: What if my architecture uses ELF files?

+

You don’t need to do anything; CLE will load your binary just fine. However, you will need to tell angr which sorts of ELF files map to the correct SimOS environment model, described in section 6. These are tracked by the content of their EI_OSABI field.

+

If you have pyelftools installed, you can identify this simply like this:

+
% readelf.py -h switchLeds.elf
+ELF Header:
+  Magic:   7f 45 4c 46 01 01 01 ff 00 00 00 00 00 00 00 00
+  Class:                             ELF32
+  Data:                              2's complement, little endian
+  Version:                           1 (current)
+  OS/ABI:                            Standalone App
+  ABI Version:                       0
+

To register this with our MSP430 environment model, we would simply do:

+
from angr.simos import register_simos
+register_simos('Standalone App', SimMSP430)
+

Were your binaries made by orcs instead? Read on.

+

Defining the BF backend

+

For BrainFuck, we really just need to read the program in, and put it in memory, rather straight-up, at address 0. +You could get away with using the Blob loader backend directly to do this, but we’re going to make it a little more explicit and demonstrative and define our own based on it.

+

First, the boring stuff:

+
from cle.backends import Blob, register_backend
+from archinfo import arch_from_id
+import re
+import logging
+l = logging.getLogger("cle.bf")
+__all__ = ('BF',)
+
+class BF(Blob):
+    def __init__(self, path, offset=0, *args, **kwargs):
+
+        super(BF, self).__init__(path, *args,
+                arch=arch_from_id("bf"),
+                offset=offset,
+                entry_point=0,
+                **kwargs)
+
+

Normally, to use the Blob loader, you must specify an entry point and arch manually. +We want to be able to just use angr.Project() on a BF program and have it work, so we subclass the Blob loader, and give it this information.

+

Next, we need to tell CLE when this loader will work on the given file, so that it can pick the right backend. +Technically, by many definitions of BF, you can have other non-instruction characters in a file and still have it be valid. For the ease of demonstration, let’s keep it simple and support the “non-compatible” BF syntax of only the instructions and newlines.

+
    @staticmethod
+    def is_compatible(stream):
+        bf_re = re.compile('[+\-<>.,\[\]\n]+')
+        stream.seek(0)
+        stuff = stream.read(0x1000)
+        if bf_re.match(stuff):
+            return True
+        return False
+

Don’t forget to seek the stream to 0!! Some other is_compatible, or the rest of CLE, is going to use it later. As they used to say when I was a kid, “Be kind, rewind” :)

+

Last but not least, we need to tell CLE about our backend.

+
register_backend("bf", BF)
+

That’s it?? That’s it.

+

If you want to see a more complex, but not too-complex example on something a bit less contrived, check out CLE’s CGC backend. CGC binaries are deliberately simplified ELF-like files, that were designed to make analysis easy, so they make a nice template for crazier formats.

+

Next time, we get to talk about lifters! Get that protein powder ready.

+ +
+ +
+
+ + + + diff --git a/blog/throwing_a_tantrum_part_4/index.html b/blog/throwing_a_tantrum_part_4/index.html new file mode 100644 index 0000000..0974258 --- /dev/null +++ b/blog/throwing_a_tantrum_part_4/index.html @@ -0,0 +1,211 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + angr + + + +
+ +

throwing a tantrum, part 4: vex and gymrat

+ +
+ + + Posted in + + + + tutorial + + + + + extending angr + + + + + gymrat + + + + + pyvex + + + + + throwing a tantrum + + + + +  by + + + + subwire + + + + + lockshaw + + + +
+ + +
+

In order for angr to perform any sort of analysis on binary code, we need to first translate, or lift, this code into an intermediate representation (IR) that angr uses, called VEX.

+

VEX is the IR used by the Valgrind analysis tools. angr uses the libvex library also used by Valgrind, etc. to lift code, and uses its pyvex package to provide a pythonic interface to the resulting IR objects.

+

However, libvex and Valgrind were tailor-made for doing what they do best: analyzing lots of desktop-ish programs. What if we want to do something super non-traditional? Like Brainfuck? Or even something a bit more reasonable like MSP430.

+

That’s where the gymrat framework included with newer versions of pyvex comes in. Gymrat’s goal is to make lifting just about anything easy, by moving the focus from messing with parsing and bits and what not, to simply and quickly specifying what the instructions actually do, which is magically translated into VEX.

+

Building your workout plan

+

Before you jump into lifting, you’re going to need some sort of plan on how to structure your lifter, to make the process easier, and to make auditing the result less painful.

+

Know your body

+

The most important part of this planning process is becoming familiar with your chosen architecture, and particularly its instructions. We touched on archinfo in a previous part of this tutorial, and we assume you have already built the archinfo class for your architecture, with all of the register maps, and so on. In this section, we will be using the BF and MSP430 examples introduced earlier to demonstrate how we designed the lifters, and why.

+

Your first step should be to find an Instruction Set Architecture (ISA) document, containing, at least, the binary formats for the instructions, and hopefully a precise description of their effects of the processor.

+

A few questions to ask yourself while reading:

+ +

Let’s consider our example of MSP430. See here for one of many references. +MSP430 instructions take one of three types, having zero, one or two operands. +One operand instructions take the form src = src (op) src. Two-operand instructions take the form dst = src (op) dst. Zero-operand instructions are conditional jumps, and merely have a condition code, and a 10-bit immediate destination address offset. Each format has its own notion of “opcode”.

+

MSP430 supports a wide variety of possible sources and destinations, based on addressing mode bits, and special register values, contained in each instruction. Operands can be the usual register contents, or can be combined with an immediate 16-bit extension word. +Instructions also support handling data of different sizes, either an 8-bit byte, or a 16-bit word, based on a flag. +Instructions can set one of four flags (Carry, Negative, Zero, and Overflow), although the behavior of these is far from unifrom.

+

This means, in summary, that there is some logic that’s common to all instructions, and some common to each type. There are, of course edge cases, but all of this can be specified neatly using gymrat.

+

Know your equipment

+

Here we will introduce briefly the primary classes used to write a lifter using gymrat. +All of the following are contained in pyvex.util:

+

GymratLifter

+

This is the actual lifter class used by pyvex. +You will need to make a subclass of this, and provide a property instrs containing a list of possible instruction classes. +GymratLifters are provided with a block of code to lift in their constructor, and when lift() is called, will iterate through the code, matching instruction classes to the bytes, and populating an IRSB object (IR Super Block) with the appropriate VEX instructions. This IRSB gets returned eventually to angr, and used for its analyses. +By default, GymratLifter will try using every instruction contained in instrs until one succeeds. +Don’t forget to call pyvex.lift.register() to tell pyvex that your new lifter exists.

+

Type

+

In the binary world, a “type” here merely denodes how many bits wide a value is, and how it is interpreted (int, float, etc) +This class uses “type imagination”, don’t worry about what sizes it supports, it will make them up for you. +Simply use Type.int_16 for a 16-bit integer, or even Type.int_9 if you really want to (cLEMENCy you say? Yeah, we can do that.) +You’ll see these mentioned around as the argument named ty.

+

Instruction

+

You should create a class for every instruction in your architecture, which should be subclasses of Instruction. Instructions receive the bitstream given to the lifter, and attempt to match it with a format string (self.bin_format), which both identifies that this is the correct instruction, and parses the various operands and flags. Format strings are specified similar to how many ISA documents will; for example, a 2-operand instruction, with fixed bits of 1101, and 2x2 bits of mode flags, could look like 1101ssssmmddddMM. The instruction would only match if it started with 1101, and each similarly-lettered bit would be extracted into a dictionary keyed by the letter.

+

The Instruction class has a number of methods designed by overriden by its subclasses, to modify behavior for each instruction or instruction type. +Here’s a brief summary:

+ +

Instruction also contains a few important methods meant to be called by its subclasses to implement the above methods.

+ +

(Note: there is also ccall(); If you have something really messed up you don’t think you can express correctly, such as something that needs extensive runtime information, you may need a ccall, but try to avoid it if you can. See the python docs for info.)

+

VexValue

+

What are all these ‘temprary values’? How do I actually specify what instructions do? That’s the magic of VexValue. +In VEX, you cannot do operations directly on registers or memory. They must be first loaded into a temporary variable, operated on, and then written back to the registers or memory. We wanted the lifter author to think as little about this as possible, so VexValue makes this whole process a snap.

+

A VexValue can be created in two different ways: by loading it out of the machine’s state using get() or put(), or by creating a constant value with constant(). You can then do normal python operations to them like any other value! +VexValues have a set Type when they are created; you can cast to a new type using the cast_to(ty) method. +You can even fetch bits using python’s slice and index notation!

+

Here’s an example, the xor instruction from our MSP430 lifter. +Of course you have to xor, but what about the types? What’s the VEX operation for xor? Weird expressions for the flags?

+

Nah.

+
    def compute_result(self, src, dst):
+        return src ^ dst
+

Or something boolean:

+
    def carry(self, src, dst, ret):
+        return ret != 0
+

It’s pretty magic.

+

Use the proper form

+

As in exercise, using the proper form when lifting is better for your health, and just makes things work better. +Its time to put the two sections above together and make your lifter’s design. A good lifter design, like any other piece of software, must minimize the amount of repetative code, while still being readable. In particular, we’d like to make the structure of our lifter as close to that of the documentation, to allow for better manual auditing.

+

Let’s walk through the design of our MSP430 lifter. We’ll come back to the BF example later; it’s too simple for this discussion.

+

As mentioned above, there are a lot of common tasks all MSP430 instructions must do, such as resolving the operands and addressing modes, grabbing the immediate extension words, and the write-back of the results of operations. These are defined in MSP430Instruction, a direct subclass of Instruction. +We’ll also define how the Status Register (flags, in compute_flags) works, and how the four flags are packed inside when it is updated. +Because the three types have their own opcode, we define match_instruction to check the o symbol here. As a final step, how values are committed to the machine’s state is dependant on the addressing mode (writing to a register, vs indexing into memory, etc), and is handled in this class as well; we expect compute_result to return the value to be written out, or None if that instruction doesn’t commit.

+

We will then define a class for each of the three types. These will set the bin_format property, as well as overriding fetch_operands to resolve the source and/or destination registers/immediates/etc, and simply return src and dst, which are passed to the instructions compute_result` methods.

+

Finally, we will create a class for each instruction, subclassing the appropriate type, and providing only the opcode (to be matched in match_instruction), the compute_result function, which returns the value to be committed, and the computation of any flags the instruction modifies.

+

Time to get swole!

+

While we aimed these features to spare the user from thinking about an IR as much as possible (did you notice we told you almost nothing about how the IR actually works?), there’s no magical formula for getting totally shredded, or for lifting every architecture. CPU architectures, like human bodies, are different, and have their own quirks, so the best thing we can do is give you really in-depth examples.

+

Our fully commented example, which lifts MSP430 binary code into VEX, can be found here. You can also find the, much simpler, BF lifter here.

+

Built a really rad lifter? Let us know on Slack

+

Next time, we get to talk about execution engines! Better get fueled up.

+ +
+ +
+
+ + + + diff --git a/browserconfig.xml b/browserconfig.xml new file mode 100644 index 0000000..c554148 --- /dev/null +++ b/browserconfig.xml @@ -0,0 +1,2 @@ + +#ffffff \ No newline at end of file diff --git a/css/404.css b/css/404.css new file mode 100644 index 0000000..877e5bb --- /dev/null +++ b/css/404.css @@ -0,0 +1,63 @@ +#background { + display: flex; + flex-direction: column; + justify-content: center; + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + background: linear-gradient(to right, + #ffffaa 0%, #ffffaa calc(20%), + #ffaaaa calc(20%), #ffaaaa calc(80%), + #ffffaa calc(80%), #ffffaa 100%); +} + +#row-center { + display: flex; + flex-direction: row; + justify-content: center; + align-items: center; + width: 100%; + margin-bottom: 10px; +} + +.bounding-line { + display: block; + height: 2px; + border: 0px; + border-top: 2px solid black; + padding: 0px; + margin: 5px 0; + width: 20%; +} + +.main-letter { + font-size: 270px; + font-family: sans; +} + +#central-picture { + width: 220px; + height: 220px; + margin-left: 50px; + margin-right: 50px; +} + +#caption { + text-align: center; + font-family: sans; + font-size: 50px; +} + +hr { + display: block; + height: 3px; + border: 0; + border-top: 3px solid black; + width: 43%; + margin: auto; + margin-top: 6%; + margin-bottom: 3%; + padding: 0; +} diff --git a/css/main.css b/css/main.css new file mode 100644 index 0000000..9e6ec2d --- /dev/null +++ b/css/main.css @@ -0,0 +1,310 @@ +html { + height: 100%; + background-color: #EEE; +} + +body { + background-color: #FFF; +} + +h2 { + margin-top: 1.5em; + margin-bottom: -0.3em; +} + +pre, p { + padding-left: 1em; + padding-right: 1em; +} + +ul { + padding-left: 3em; +} + +a:link { + color: #FF2D00; +} + +a:visited { + color: #871800; +} + +.tech { + font-family: monospace; +} + +.codesample { + line-height: 1.4; +} + +.pyprompt { + color: #aaa; +} + +.pyinput { + font-weight: bold; +} + +.pyoutput { + color: #333; +} + +#topbar { + width: 100%; + margin: 0; + background-color: #EEE; + border-bottom: 1px solid #CCC; + min-height: 100px; +} + +#logo { + position: absolute; + left: 130px; + top: -20px; + width: 150px; + height: 150px; +} + +#title { + position: absolute; + left: 20px; + top: 20px; + font-size: 50px; + font-family: monospace; + text-decoration: none; +} + +#title a, #title a:visited { + color:black; + text-decoration: none; +} + +#nav { + display: block; + padding: 0; + margin: 0; + padding-left: 310px; + padding-top: 22px; + text-align: right; + margin-right: 10%; + + font-size: 1.5em; + font-family: monospace; +} + +#prompt { + display: inline-block; + padding: 10px; +} + +#nav li { + list-style: none; + display: inline-block; + padding: 15px; + border-radius: 3px; + background-color: #EEE; +} + +#nav li:hover { + background-color: #DDD; +} + +#nav a, #nav a:visited { + color: black; +} + +@media (max-width: 550px) { + #nav { + padding-left: 5px; + padding-top: 160px; + } +} + +#bodycolumn { + max-width: 992px; + padding-top: 20px; + padding-left: 10px; + padding-right: 10px; + margin: 0px auto; +} + +#footer { + background-color: #EEE; + border-top: 1px solid #DDD; + width: 100%; + height: 100px; + font-size: 12px; + font-style: italic; + text-align: center; +} + +#show-more-papers { + margin: 20px; +} + +.show-more, .show-less { + margin: 0px auto; + font-size: 10px; + width: 200px; + text-align: center; + font-style: italic; + font-weight: bold; + padding: 5px; + border-radius: 5px; +} + +.show-more:hover, .show-less:hover { + background-color: #EEE; +} + +.expandable { overflow: hidden; height: 0px; } +.expand-check { display: none; } +.show-less { display: none; } +.show-more { display: inline; } +.expand-check:checked ~ .expandable { height: auto; } +.expand-check:checked + label .show-more { display: none; } +.expand-check:checked + label .show-less { display: inline; } +.block { display: block; } + +#announce { + font-style: italic; + padding: 30px; + margin: 20px auto; + text-align: center; + background-color: #EEE; + border: 2px dashed #CCC; + border-radius: 10px; +} + +.post { + border-radius: 5px; + padding: 12px 5px 12px 5px; + display: block; + color: black; + text-decoration: none; +} + +.post:visited, .post:link { + color: black; + text-decoration: none; +} + +.post .list-main, .post span { + padding-left: 0px; + transition: padding-left 0.5s; +} + +.subtext { + color: grey; + font-size: 0.75em; + width: 100% +} + +.tag, .tag:visited, .tag:link { + background-color: #EEE; + border-radius: 3px; + padding: 3px; + color: black; + text-decoration: none; + margin: 1px; + transition: background-color 0.15s; +} + +.tag:hover { + background-color: #CCC; +} + +.code-chunk pre { + background-color: #EEE; + margin: 3%; + border-radius: 8px; +} + +.bar-appears { + border-width: 0 0 0 10px; + border-style: solid; + border-left-color: transparent; + transition: all 0.1s ease-out 0.005s; + padding-top: 20px; + padding-bottom: 20px; + padding-left: 10px; + background-color: none; +} + +.post:hover .bar-appears { + border-left-color: #ffa500; + background-color: #EEE; +} + +.list-main { + display: flex; + flex-direction: row; + align-items: center; + margin-left: 10px; +} + +.list-arrow { + color: #ff6c00; + font-size: 0.75em; + margin-bottom: 0px; + padding-right: 20px; +} + +.list-title { + font-size: 1.75em; + margin-bottom: 0px; +} + +.newline-image { + background-color: #EEE; + border-width: 1px; + border-style: solid; + border-color: #ffb076; + margin: 3%; + margin-right: 5%; + padding: 20px; + border-radius: 5px; +} + +.hidden { display: none; } + +#features-list { + list-style-type: none; + padding: 0; + margin: 1em 0; +} + +.cards { + display: flex; + flex-wrap: wrap; + } + +.card { + flex: 1 0 500px; + box-sizing: border-box; + margin: .25em .25em; + padding: 0.5em; + background-color: #eee; + border-radius: 10px; + font-size: 0.9em; + display: flex; +} + +.card-icon { + padding: 1em 0.5em; + font-size: 1.17em; +} + +.card h3 { + font-weight: normal; +} + +.card p { + padding: 0; +} + +@media screen and (min-width: 768px) { + .card { + max-width: calc(50% - 1em); + } +} diff --git a/css/pure-min.css b/css/pure-min.css new file mode 100644 index 0000000..e0cc408 --- /dev/null +++ b/css/pure-min.css @@ -0,0 +1,11 @@ +/*! +Pure v2.1.0 +Copyright 2013 Yahoo! +Licensed under the BSD License. +https://github.com/pure-css/pure/blob/master/LICENSE +*/ +/*! +normalize.css v | MIT License | git.io/normalize +Copyright (c) Nicolas Gallagher and Jonathan Neal +*/ +/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{-webkit-box-sizing:content-box;box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{-webkit-box-sizing:border-box;box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html{font-family:sans-serif}.hidden,[hidden]{display:none!important}.pure-img{max-width:100%;height:auto;display:block}.pure-g{letter-spacing:-.31em;text-rendering:optimizespeed;font-family:FreeSans,Arimo,"Droid Sans",Helvetica,Arial,sans-serif;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-flow:row wrap;flex-flow:row wrap;-ms-flex-line-pack:start;align-content:flex-start}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){table .pure-g{display:block}}.opera-only :-o-prefocus,.pure-g{word-spacing:-0.43em}.pure-u{display:inline-block;letter-spacing:normal;word-spacing:normal;vertical-align:top;text-rendering:auto}.pure-g [class*=pure-u]{font-family:sans-serif}.pure-u-1,.pure-u-1-1,.pure-u-1-12,.pure-u-1-2,.pure-u-1-24,.pure-u-1-3,.pure-u-1-4,.pure-u-1-5,.pure-u-1-6,.pure-u-1-8,.pure-u-10-24,.pure-u-11-12,.pure-u-11-24,.pure-u-12-24,.pure-u-13-24,.pure-u-14-24,.pure-u-15-24,.pure-u-16-24,.pure-u-17-24,.pure-u-18-24,.pure-u-19-24,.pure-u-2-24,.pure-u-2-3,.pure-u-2-5,.pure-u-20-24,.pure-u-21-24,.pure-u-22-24,.pure-u-23-24,.pure-u-24-24,.pure-u-3-24,.pure-u-3-4,.pure-u-3-5,.pure-u-3-8,.pure-u-4-24,.pure-u-4-5,.pure-u-5-12,.pure-u-5-24,.pure-u-5-5,.pure-u-5-6,.pure-u-5-8,.pure-u-6-24,.pure-u-7-12,.pure-u-7-24,.pure-u-7-8,.pure-u-8-24,.pure-u-9-24{display:inline-block;letter-spacing:normal;word-spacing:normal;vertical-align:top;text-rendering:auto}.pure-u-1-24{width:4.1667%}.pure-u-1-12,.pure-u-2-24{width:8.3333%}.pure-u-1-8,.pure-u-3-24{width:12.5%}.pure-u-1-6,.pure-u-4-24{width:16.6667%}.pure-u-1-5{width:20%}.pure-u-5-24{width:20.8333%}.pure-u-1-4,.pure-u-6-24{width:25%}.pure-u-7-24{width:29.1667%}.pure-u-1-3,.pure-u-8-24{width:33.3333%}.pure-u-3-8,.pure-u-9-24{width:37.5%}.pure-u-2-5{width:40%}.pure-u-10-24,.pure-u-5-12{width:41.6667%}.pure-u-11-24{width:45.8333%}.pure-u-1-2,.pure-u-12-24{width:50%}.pure-u-13-24{width:54.1667%}.pure-u-14-24,.pure-u-7-12{width:58.3333%}.pure-u-3-5{width:60%}.pure-u-15-24,.pure-u-5-8{width:62.5%}.pure-u-16-24,.pure-u-2-3{width:66.6667%}.pure-u-17-24{width:70.8333%}.pure-u-18-24,.pure-u-3-4{width:75%}.pure-u-19-24{width:79.1667%}.pure-u-4-5{width:80%}.pure-u-20-24,.pure-u-5-6{width:83.3333%}.pure-u-21-24,.pure-u-7-8{width:87.5%}.pure-u-11-12,.pure-u-22-24{width:91.6667%}.pure-u-23-24{width:95.8333%}.pure-u-1,.pure-u-1-1,.pure-u-24-24,.pure-u-5-5{width:100%}.pure-button{display:inline-block;line-height:normal;white-space:nowrap;vertical-align:middle;text-align:center;cursor:pointer;-webkit-user-drag:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-box-sizing:border-box;box-sizing:border-box}.pure-button::-moz-focus-inner{padding:0;border:0}.pure-button-group{letter-spacing:-.31em;text-rendering:optimizespeed}.opera-only :-o-prefocus,.pure-button-group{word-spacing:-0.43em}.pure-button-group .pure-button{letter-spacing:normal;word-spacing:normal;vertical-align:top;text-rendering:auto}.pure-button{font-family:inherit;font-size:100%;padding:.5em 1em;color:rgba(0,0,0,.8);border:none transparent;background-color:#e6e6e6;text-decoration:none;border-radius:2px}.pure-button-hover,.pure-button:focus,.pure-button:hover{background-image:-webkit-gradient(linear,left top,left bottom,from(transparent),color-stop(40%,rgba(0,0,0,.05)),to(rgba(0,0,0,.1)));background-image:linear-gradient(transparent,rgba(0,0,0,.05) 40%,rgba(0,0,0,.1))}.pure-button:focus{outline:0}.pure-button-active,.pure-button:active{-webkit-box-shadow:0 0 0 1px rgba(0,0,0,.15) inset,0 0 6px rgba(0,0,0,.2) inset;box-shadow:0 0 0 1px rgba(0,0,0,.15) inset,0 0 6px rgba(0,0,0,.2) inset;border-color:#000}.pure-button-disabled,.pure-button-disabled:active,.pure-button-disabled:focus,.pure-button-disabled:hover,.pure-button[disabled]{border:none;background-image:none;opacity:.4;cursor:not-allowed;-webkit-box-shadow:none;box-shadow:none;pointer-events:none}.pure-button-hidden{display:none}.pure-button-primary,.pure-button-selected,a.pure-button-primary,a.pure-button-selected{background-color:#0078e7;color:#fff}.pure-button-group .pure-button{margin:0;border-radius:0;border-right:1px solid rgba(0,0,0,.2)}.pure-button-group .pure-button:first-child{border-top-left-radius:2px;border-bottom-left-radius:2px}.pure-button-group .pure-button:last-child{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:none}.pure-form input[type=color],.pure-form input[type=date],.pure-form input[type=datetime-local],.pure-form input[type=datetime],.pure-form input[type=email],.pure-form input[type=month],.pure-form input[type=number],.pure-form input[type=password],.pure-form input[type=search],.pure-form input[type=tel],.pure-form input[type=text],.pure-form input[type=time],.pure-form input[type=url],.pure-form input[type=week],.pure-form select,.pure-form textarea{padding:.5em .6em;display:inline-block;border:1px solid #ccc;-webkit-box-shadow:inset 0 1px 3px #ddd;box-shadow:inset 0 1px 3px #ddd;border-radius:4px;vertical-align:middle;-webkit-box-sizing:border-box;box-sizing:border-box}.pure-form input:not([type]){padding:.5em .6em;display:inline-block;border:1px solid #ccc;-webkit-box-shadow:inset 0 1px 3px #ddd;box-shadow:inset 0 1px 3px #ddd;border-radius:4px;-webkit-box-sizing:border-box;box-sizing:border-box}.pure-form input[type=color]{padding:.2em .5em}.pure-form input[type=color]:focus,.pure-form input[type=date]:focus,.pure-form input[type=datetime-local]:focus,.pure-form input[type=datetime]:focus,.pure-form input[type=email]:focus,.pure-form input[type=month]:focus,.pure-form input[type=number]:focus,.pure-form input[type=password]:focus,.pure-form input[type=search]:focus,.pure-form input[type=tel]:focus,.pure-form input[type=text]:focus,.pure-form input[type=time]:focus,.pure-form input[type=url]:focus,.pure-form input[type=week]:focus,.pure-form select:focus,.pure-form textarea:focus{outline:0;border-color:#129fea}.pure-form input:not([type]):focus{outline:0;border-color:#129fea}.pure-form input[type=checkbox]:focus,.pure-form input[type=file]:focus,.pure-form input[type=radio]:focus{outline:thin solid #129FEA;outline:1px auto #129FEA}.pure-form .pure-checkbox,.pure-form .pure-radio{margin:.5em 0;display:block}.pure-form input[type=color][disabled],.pure-form input[type=date][disabled],.pure-form input[type=datetime-local][disabled],.pure-form input[type=datetime][disabled],.pure-form input[type=email][disabled],.pure-form input[type=month][disabled],.pure-form input[type=number][disabled],.pure-form input[type=password][disabled],.pure-form input[type=search][disabled],.pure-form input[type=tel][disabled],.pure-form input[type=text][disabled],.pure-form input[type=time][disabled],.pure-form input[type=url][disabled],.pure-form input[type=week][disabled],.pure-form select[disabled],.pure-form textarea[disabled]{cursor:not-allowed;background-color:#eaeded;color:#cad2d3}.pure-form input:not([type])[disabled]{cursor:not-allowed;background-color:#eaeded;color:#cad2d3}.pure-form input[readonly],.pure-form select[readonly],.pure-form textarea[readonly]{background-color:#eee;color:#777;border-color:#ccc}.pure-form input:focus:invalid,.pure-form select:focus:invalid,.pure-form textarea:focus:invalid{color:#b94a48;border-color:#e9322d}.pure-form input[type=checkbox]:focus:invalid:focus,.pure-form input[type=file]:focus:invalid:focus,.pure-form input[type=radio]:focus:invalid:focus{outline-color:#e9322d}.pure-form select{height:2.25em;border:1px solid #ccc;background-color:#fff}.pure-form select[multiple]{height:auto}.pure-form label{margin:.5em 0 .2em}.pure-form fieldset{margin:0;padding:.35em 0 .75em;border:0}.pure-form legend{display:block;width:100%;padding:.3em 0;margin-bottom:.3em;color:#333;border-bottom:1px solid #e5e5e5}.pure-form-stacked input[type=color],.pure-form-stacked input[type=date],.pure-form-stacked input[type=datetime-local],.pure-form-stacked input[type=datetime],.pure-form-stacked input[type=email],.pure-form-stacked input[type=file],.pure-form-stacked input[type=month],.pure-form-stacked input[type=number],.pure-form-stacked input[type=password],.pure-form-stacked input[type=search],.pure-form-stacked input[type=tel],.pure-form-stacked input[type=text],.pure-form-stacked input[type=time],.pure-form-stacked input[type=url],.pure-form-stacked input[type=week],.pure-form-stacked label,.pure-form-stacked select,.pure-form-stacked textarea{display:block;margin:.25em 0}.pure-form-stacked input:not([type]){display:block;margin:.25em 0}.pure-form-aligned input,.pure-form-aligned select,.pure-form-aligned textarea,.pure-form-message-inline{display:inline-block;vertical-align:middle}.pure-form-aligned textarea{vertical-align:top}.pure-form-aligned .pure-control-group{margin-bottom:.5em}.pure-form-aligned .pure-control-group label{text-align:right;display:inline-block;vertical-align:middle;width:10em;margin:0 1em 0 0}.pure-form-aligned .pure-controls{margin:1.5em 0 0 11em}.pure-form .pure-input-rounded,.pure-form input.pure-input-rounded{border-radius:2em;padding:.5em 1em}.pure-form .pure-group fieldset{margin-bottom:10px}.pure-form .pure-group input,.pure-form .pure-group textarea{display:block;padding:10px;margin:0 0 -1px;border-radius:0;position:relative;top:-1px}.pure-form .pure-group input:focus,.pure-form .pure-group textarea:focus{z-index:3}.pure-form .pure-group input:first-child,.pure-form .pure-group textarea:first-child{top:1px;border-radius:4px 4px 0 0;margin:0}.pure-form .pure-group input:first-child:last-child,.pure-form .pure-group textarea:first-child:last-child{top:1px;border-radius:4px;margin:0}.pure-form .pure-group input:last-child,.pure-form .pure-group textarea:last-child{top:-2px;border-radius:0 0 4px 4px;margin:0}.pure-form .pure-group button{margin:.35em 0}.pure-form .pure-input-1{width:100%}.pure-form .pure-input-3-4{width:75%}.pure-form .pure-input-2-3{width:66%}.pure-form .pure-input-1-2{width:50%}.pure-form .pure-input-1-3{width:33%}.pure-form .pure-input-1-4{width:25%}.pure-form-message-inline{display:inline-block;padding-left:.3em;color:#666;vertical-align:middle;font-size:.875em}.pure-form-message{display:block;color:#666;font-size:.875em}@media only screen and (max-width :480px){.pure-form button[type=submit]{margin:.7em 0 0}.pure-form input:not([type]),.pure-form input[type=color],.pure-form input[type=date],.pure-form input[type=datetime-local],.pure-form input[type=datetime],.pure-form input[type=email],.pure-form input[type=month],.pure-form input[type=number],.pure-form input[type=password],.pure-form input[type=search],.pure-form input[type=tel],.pure-form input[type=text],.pure-form input[type=time],.pure-form input[type=url],.pure-form input[type=week],.pure-form label{margin-bottom:.3em;display:block}.pure-group input:not([type]),.pure-group input[type=color],.pure-group input[type=date],.pure-group input[type=datetime-local],.pure-group input[type=datetime],.pure-group input[type=email],.pure-group input[type=month],.pure-group input[type=number],.pure-group input[type=password],.pure-group input[type=search],.pure-group input[type=tel],.pure-group input[type=text],.pure-group input[type=time],.pure-group input[type=url],.pure-group input[type=week]{margin-bottom:0}.pure-form-aligned .pure-control-group label{margin-bottom:.3em;text-align:left;display:block;width:100%}.pure-form-aligned .pure-controls{margin:1.5em 0 0 0}.pure-form-message,.pure-form-message-inline{display:block;font-size:.75em;padding:.2em 0 .8em}}.pure-menu{-webkit-box-sizing:border-box;box-sizing:border-box}.pure-menu-fixed{position:fixed;left:0;top:0;z-index:3}.pure-menu-item,.pure-menu-list{position:relative}.pure-menu-list{list-style:none;margin:0;padding:0}.pure-menu-item{padding:0;margin:0;height:100%}.pure-menu-heading,.pure-menu-link{display:block;text-decoration:none;white-space:nowrap}.pure-menu-horizontal{width:100%;white-space:nowrap}.pure-menu-horizontal .pure-menu-list{display:inline-block}.pure-menu-horizontal .pure-menu-heading,.pure-menu-horizontal .pure-menu-item,.pure-menu-horizontal .pure-menu-separator{display:inline-block;vertical-align:middle}.pure-menu-item .pure-menu-item{display:block}.pure-menu-children{display:none;position:absolute;left:100%;top:0;margin:0;padding:0;z-index:3}.pure-menu-horizontal .pure-menu-children{left:0;top:auto;width:inherit}.pure-menu-active>.pure-menu-children,.pure-menu-allow-hover:hover>.pure-menu-children{display:block;position:absolute}.pure-menu-has-children>.pure-menu-link:after{padding-left:.5em;content:"\25B8";font-size:small}.pure-menu-horizontal .pure-menu-has-children>.pure-menu-link:after{content:"\25BE"}.pure-menu-scrollable{overflow-y:scroll;overflow-x:hidden}.pure-menu-scrollable .pure-menu-list{display:block}.pure-menu-horizontal.pure-menu-scrollable .pure-menu-list{display:inline-block}.pure-menu-horizontal.pure-menu-scrollable{white-space:nowrap;overflow-y:hidden;overflow-x:auto;padding:.5em 0}.pure-menu-horizontal .pure-menu-children .pure-menu-separator,.pure-menu-separator{background-color:#ccc;height:1px;margin:.3em 0}.pure-menu-horizontal .pure-menu-separator{width:1px;height:1.3em;margin:0 .3em}.pure-menu-horizontal .pure-menu-children .pure-menu-separator{display:block;width:auto}.pure-menu-heading{text-transform:uppercase;color:#565d64}.pure-menu-link{color:#777}.pure-menu-children{background-color:#fff}.pure-menu-heading,.pure-menu-link{padding:.5em 1em}.pure-menu-disabled{opacity:.5}.pure-menu-disabled .pure-menu-link:hover{background-color:transparent;cursor:default}.pure-menu-active>.pure-menu-link,.pure-menu-link:focus,.pure-menu-link:hover{background-color:#eee}.pure-menu-selected>.pure-menu-link,.pure-menu-selected>.pure-menu-link:visited{color:#000}.pure-table{border-collapse:collapse;border-spacing:0;empty-cells:show;border:1px solid #cbcbcb}.pure-table caption{color:#000;font:italic 85%/1 arial,sans-serif;padding:1em 0;text-align:center}.pure-table td,.pure-table th{border-left:1px solid #cbcbcb;border-width:0 0 0 1px;font-size:inherit;margin:0;overflow:visible;padding:.5em 1em}.pure-table thead{background-color:#e0e0e0;color:#000;text-align:left;vertical-align:bottom}.pure-table td{background-color:transparent}.pure-table-odd td{background-color:#f2f2f2}.pure-table-striped tr:nth-child(2n-1) td{background-color:#f2f2f2}.pure-table-bordered td{border-bottom:1px solid #cbcbcb}.pure-table-bordered tbody>tr:last-child>td{border-bottom-width:0}.pure-table-horizontal td,.pure-table-horizontal th{border-width:0 0 1px 0;border-bottom:1px solid #cbcbcb}.pure-table-horizontal tbody>tr:last-child>td{border-bottom-width:0} \ No newline at end of file diff --git a/css/single.css b/css/single.css new file mode 100644 index 0000000..91e0459 --- /dev/null +++ b/css/single.css @@ -0,0 +1,31 @@ +.post-content h1 { + font-size: 25px; + color: black; +} + +.post-content h2 { + font-size: 22px; + color: black; +} + +.post-content h3 { + font-size: 20px; + color: black; +} + +.post-content h4 { + font-size: 17px; + color: black; +} + +.post-content h5 { + font-size: 15px; + color: black; +} + +.post-content code { + background-color: #DDD; + font-size: 14px; + padding: 1px 3px 1px 3px; + border-radius: 3px; +} diff --git a/css/syntax.css b/css/syntax.css new file mode 100644 index 0000000..359a1c4 --- /dev/null +++ b/css/syntax.css @@ -0,0 +1,368 @@ +/* Background */ +.chroma { + background-color: #EEE; + border-width: 1px; + border-style: solid; + border-color: #ffb076; + border-radius: 5px; + font-size: 13px; + margin: 5px 25px 5px 25px; + padding-top: 10px; + padding-bottom: 10px; +} + +.post-content .chroma code { + background-color: transparent; + padding: 0px; +} + +/* Error */ +.chroma .err { + color: #a61717; + background-color: #e3d2d2 +} + +/* LineTableTD */ +.chroma .lntd { + ; + vertical-align: top; + padding: 0; + margin: 0; + border: 0; +} + +/* LineTable */ +.chroma .lntable { + ; + border-spacing: 0; + padding: 0; + margin: 0; + border: 0; + width: 100%; + overflow: auto; + display: block; +} + +/* LineHighlight */ +.chroma .hl { + background-color: #ffffcc; + display: block; + width: 100% +} + +/* LineNumbersTable */ +.chroma .lnt { + margin-right: 0.4em; + padding: 0 0.4em 0 0.4em; + display: block; +} + +/* LineNumbers */ +.chroma .ln { + margin-right: 0.4em; + padding: 0 0.4em 0 0.4em; +} + +/* Keyword */ +.chroma .k { + font-weight: bold +} + +/* KeywordConstant */ +.chroma .kc { + font-weight: bold +} + +/* KeywordDeclaration */ +.chroma .kd { + font-weight: bold +} + +/* KeywordNamespace */ +.chroma .kn { + font-weight: bold +} + +/* KeywordPseudo */ +.chroma .kp { + font-weight: bold +} + +/* KeywordReserved */ +.chroma .kr { + font-weight: bold +} + +/* KeywordType */ +.chroma .kt { + color: #445588; + font-weight: bold +} + +/* NameAttribute */ +.chroma .na { + color: #008080 +} + +/* NameBuiltin */ +.chroma .nb { + color: #999999 +} + +/* NameClass */ +.chroma .nc { + color: #900c8f; + font-weight: bold +} + +/* NameConstant */ +.chroma .no { + color: #008080 +} + +/* NameEntity */ +.chroma .ni { + color: #800080 +} + +/* NameException */ +.chroma .ne { + color: #990000; + font-weight: bold +} + +/* NameFunction */ +.chroma .nf { + color: #871800; + font-weight: bold; +} + +/* NameNamespace */ +.chroma .nn { + color: #555555 +} + +/* NameTag */ +.chroma .nt { + color: #000080 +} + +/* NameVariable */ +.chroma .nv { + color: #008080 +} + +/* LiteralString */ +.chroma .s { + color: #FF6C00; +} + +/* LiteralStringAffix */ +.chroma .sa { + color: #FF6C00; +} + +/* LiteralStringBacktick */ +.chroma .sb { + color: #FF6C00; +} + +/* LiteralStringChar */ +.chroma .sc { + color: #FF6C00; +} + +/* LiteralStringDelimiter */ +.chroma .dl { + color: #FF6C00; +} + +/* LiteralStringDoc */ +.chroma .sd { + color: #FF6C00; +} + +/* LiteralStringDouble */ +.chroma .s2 { + color: #FF6C00; +} + +/* LiteralStringEscape */ +.chroma .se { + color: #FF6C00; +} + +/* LiteralStringHeredoc */ +.chroma .sh { + color: #FF6C00; +} + +/* LiteralStringInterpol */ +.chroma .si { + color: #FF6C00; +} + +/* LiteralStringOther */ +.chroma .sx { + color: #FF6C00; +} + +/* LiteralStringRegex */ +.chroma .sr { + color: #808000 +} + +/* LiteralStringSingle */ +.chroma .s1 { + color: #FF6C00; +} + +/* LiteralStringSymbol */ +.chroma .ss { + color: #FF6C00; +} + +/* LiteralNumber */ +.chroma .m { + color: #ff2d00; +} + +/* LiteralNumberBin */ +.chroma .mb { + color: #ff2d00; +} + +/* LiteralNumberFloat */ +.chroma .mf { + color: #ff2d00; +} + +/* LiteralNumberHex */ +.chroma .mh { + color: #ff2d00; +} + +/* LiteralNumberInteger */ +.chroma .mi { + color: #ff2d00; +} + +/* LiteralNumberIntegerLong */ +.chroma .il { + color: #ff2d00; +} + +/* LiteralNumberOct */ +.chroma .mo { + color: #ff2d00; +} + +/* Operator */ +.chroma .o { + font-weight: bold +} + +/* OperatorWord */ +.chroma .ow { + font-weight: bold +} + +/* Comment */ +.chroma .c { + color: #999988; + font-style: italic +} + +/* CommentHashbang */ +.chroma .ch { + color: #999988; + font-style: italic +} + +/* CommentMultiline */ +.chroma .cm { + color: #999988; + font-style: italic +} + +/* CommentSingle */ +.chroma .c1 { + color: #999988; + font-style: italic +} + +/* CommentSpecial */ +.chroma .cs { + color: #999999; + font-weight: bold; + font-style: italic +} + +/* CommentPreproc */ +.chroma .cp { + color: #999999; + font-weight: bold +} + +/* CommentPreprocFile */ +.chroma .cpf { + color: #999999; + font-weight: bold +} + +/* GenericDeleted */ +.chroma .gd { + color: #000000; + background-color: #ffdddd +} + +/* GenericEmph */ +.chroma .ge { + font-style: italic +} + +/* GenericError */ +.chroma .gr { + color: #aa0000 +} + +/* GenericHeading */ +.chroma .gh { + color: #999999 +} + +/* GenericInserted */ +.chroma .gi { + color: #000000; + background-color: #ddffdd +} + +/* GenericOutput */ +.chroma .go { + color: #888888 +} + +/* GenericPrompt */ +.chroma .gp { + color: #555555 +} + +/* GenericStrong */ +.chroma .gs { + font-weight: bold +} + +/* GenericSubheading */ +.chroma .gu { + color: #aaaaaa +} + +/* GenericTraceback */ +.chroma .gt { + color: #aa0000 +} + +/* TextWhitespace */ +.chroma .w { + color: #bbbbbb +} diff --git a/favicon-16x16.png b/favicon-16x16.png new file mode 100644 index 0000000..1b142fc Binary files /dev/null and b/favicon-16x16.png differ diff --git a/favicon-32x32.png b/favicon-32x32.png new file mode 100644 index 0000000..e394f82 Binary files /dev/null and b/favicon-32x32.png differ diff --git a/favicon-96x96.png b/favicon-96x96.png new file mode 100644 index 0000000..cf35916 Binary files /dev/null and b/favicon-96x96.png differ diff --git a/favicon.ico b/favicon.ico new file mode 100644 index 0000000..296370d Binary files /dev/null and b/favicon.ico differ diff --git a/img/angr_diagram.png b/img/angr_diagram.png new file mode 100644 index 0000000..388fe37 Binary files /dev/null and b/img/angr_diagram.png differ diff --git a/img/angry_face.png b/img/angry_face.png new file mode 100644 index 0000000..0662f72 Binary files /dev/null and b/img/angry_face.png differ diff --git a/img/author.png b/img/author.png new file mode 100644 index 0000000..4c77a68 Binary files /dev/null and b/img/author.png differ diff --git a/img/feed-icon-14x14.png b/img/feed-icon-14x14.png new file mode 100644 index 0000000..b3c949d Binary files /dev/null and b/img/feed-icon-14x14.png differ diff --git a/img/pysoot_arch.png b/img/pysoot_arch.png new file mode 100644 index 0000000..7db4a21 Binary files /dev/null and b/img/pysoot_arch.png differ diff --git a/img/symbion_ct_interaction.gif b/img/symbion_ct_interaction.gif new file mode 100644 index 0000000..11df8fc Binary files /dev/null and b/img/symbion_ct_interaction.gif differ diff --git a/img/symbion_ex1.png b/img/symbion_ex1.png new file mode 100644 index 0000000..3b43881 Binary files /dev/null and b/img/symbion_ex1.png differ diff --git a/img/symbion_ex2.png b/img/symbion_ex2.png new file mode 100644 index 0000000..a889199 Binary files /dev/null and b/img/symbion_ex2.png differ diff --git a/img/symbion_ex3.png b/img/symbion_ex3.png new file mode 100644 index 0000000..cd4447c Binary files /dev/null and b/img/symbion_ex3.png differ diff --git a/img/symbion_lazymem.jpg b/img/symbion_lazymem.jpg new file mode 100644 index 0000000..ed3dad0 Binary files /dev/null and b/img/symbion_lazymem.jpg differ diff --git a/img/symbion_sys_overview.png b/img/symbion_sys_overview.png new file mode 100644 index 0000000..0f33c27 Binary files /dev/null and b/img/symbion_sys_overview.png differ diff --git a/img/symbion_workflow.jpg b/img/symbion_workflow.jpg new file mode 100644 index 0000000..b271707 Binary files /dev/null and b/img/symbion_workflow.jpg differ diff --git a/img/tag.png b/img/tag.png new file mode 100644 index 0000000..a3b89ce Binary files /dev/null and b/img/tag.png differ diff --git a/img/virtualenv_detected.jpg b/img/virtualenv_detected.jpg new file mode 100644 index 0000000..def6576 Binary files /dev/null and b/img/virtualenv_detected.jpg differ diff --git a/index.html b/index.html new file mode 100644 index 0000000..50764f4 --- /dev/null +++ b/index.html @@ -0,0 +1,470 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + angr + + + +
+ + + + + +

angr

+

angr is an open-source binary analysis platform for Python. It combines both static and dynamic symbolic ("concolic") analysis, providing tools to solve a variety of tasks.

+ +

Features

+ + + +

Applications

+

As an introduction to angr's capabilities, here are some of the things that you can do using angr and the tools built with it:

+ + + +

angr itself is made up of several subprojects, all of which can be used separately in other projects: +

+ +

Installation

+

angr is installed as a Python 3.10+ package, and can be easily installed via PIP.

+ +
pip install angr
+
+ +

Documentation

+

There are a few resources you can use to help you get up to speed!

+ + + +

Community

+

There are a few resources you can use to help you get up to speed or get you contributing to the project!

+ + + +

In all this, please keep in mind that angr is a large project being frantically worked on by a very small group of overworked students. It's open source, with a typical open source support model (i.e., pray for the best).

+

For an idea of what to help with, check this out. + +

Citation

+ +

We have used angr heavily in our academic research! If you have used angr or its sub-components in your research, please cite at least the following paper describing it:

+ +
@inproceedings{shoshitaishvili2016state,
+  title={{SoK: (State of) The Art of War: Offensive Techniques in Binary Analysis}},
+  author={Shoshitaishvili, Yan and Wang, Ruoyu and Salls, Christopher and
+          Stephens, Nick and Polino, Mario and Dutcher, Audrey and Grosen, John and
+          Feng, Siji and Hauser, Christophe and Kruegel, Christopher and Vigna, Giovanni},
+  booktitle={IEEE Symposium on Security and Privacy},
+  year={2016}
+}
+ + +
+ + + +
+ + +

Semi-academically, angr was one of the underpinnings of Shellphish's Cyber Reasoning System for the DARPA Cyber Grand Challenge, enabling them to win third place in the final round (more info here)! Shellphish has also used angr in many CTFs.

+ +

Who works on angr?

+

angr is worked on by several researchers in the Computer Security Lab at UC Santa Barbara and SEFCOM at Arizona State University. Core developers (arbitrarily, 1000+ lines of code!) include:

+ + +

angr would never have happened if it were not for the vision, wisdom, guidance, and support of the professors:

+ + +

Additionally, there are many open-source contributors, which you can see at + the + various + repositories + in + the + github + orgs. + + +

+ +
+ + + + + diff --git a/invite/index.html b/invite/index.html new file mode 100644 index 0000000..380e8c1 --- /dev/null +++ b/invite/index.html @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + angr + + + +
+ +

Join our Slack!

+

angr does most of its communication through a slack channel: angr.slack.com.

+

To get an slack invite, submit this form:

+
+
+ Email address:
+ Affiliation (university, company, country, anything!):
+ How are you planning on using angr?
+ +
+
+
+ +
+
+ + + + diff --git a/manifest.json b/manifest.json new file mode 100644 index 0000000..013d4a6 --- /dev/null +++ b/manifest.json @@ -0,0 +1,41 @@ +{ + "name": "App", + "icons": [ + { + "src": "\/android-icon-36x36.png", + "sizes": "36x36", + "type": "image\/png", + "density": "0.75" + }, + { + "src": "\/android-icon-48x48.png", + "sizes": "48x48", + "type": "image\/png", + "density": "1.0" + }, + { + "src": "\/android-icon-72x72.png", + "sizes": "72x72", + "type": "image\/png", + "density": "1.5" + }, + { + "src": "\/android-icon-96x96.png", + "sizes": "96x96", + "type": "image\/png", + "density": "2.0" + }, + { + "src": "\/android-icon-144x144.png", + "sizes": "144x144", + "type": "image\/png", + "density": "3.0" + }, + { + "src": "\/android-icon-192x192.png", + "sizes": "192x192", + "type": "image\/png", + "density": "4.0" + } + ] +} \ No newline at end of file diff --git a/ms-icon-144x144.png b/ms-icon-144x144.png new file mode 100644 index 0000000..5c86a1a Binary files /dev/null and b/ms-icon-144x144.png differ diff --git a/ms-icon-150x150.png b/ms-icon-150x150.png new file mode 100644 index 0000000..8556860 Binary files /dev/null and b/ms-icon-150x150.png differ diff --git a/ms-icon-310x310.png b/ms-icon-310x310.png new file mode 100644 index 0000000..f48c6bf Binary files /dev/null and b/ms-icon-310x310.png differ diff --git a/ms-icon-70x70.png b/ms-icon-70x70.png new file mode 100644 index 0000000..01527c3 Binary files /dev/null and b/ms-icon-70x70.png differ diff --git a/sitemap.xml b/sitemap.xml new file mode 100644 index 0000000..8cbdc3f --- /dev/null +++ b/sitemap.xml @@ -0,0 +1,126 @@ + + + + https://angr.io/tags/android/ + 2019-04-14T15:48:59-08:00 + + https://angr.io/ + 2019-04-14T15:48:59-08:00 + + https://angr.io/tags/announcements/ + 2019-04-14T15:48:59-08:00 + + https://angr.io/authors/anton00b/ + 2019-04-14T15:48:59-08:00 + + https://angr.io/authors/ + 2019-04-14T15:48:59-08:00 + + https://angr.io/blog/ + 2019-04-14T15:48:59-08:00 + + https://angr.io/authors/conand/ + 2019-04-14T15:48:59-08:00 + + https://angr.io/blog/java_angr/ + 2019-04-14T15:48:59-08:00 + + https://angr.io/tags/extending_angr/ + 2019-04-14T15:48:59-08:00 + + https://angr.io/tags/java/ + 2019-04-14T15:48:59-08:00 + + https://angr.io/authors/phate/ + 2019-04-14T15:48:59-08:00 + + https://angr.io/tags/ + 2019-04-14T15:48:59-08:00 + + https://angr.io/tags/tutorial/ + 2019-04-14T15:48:59-08:00 + + https://angr.io/authors/degrigis/ + 2018-11-20T15:48:59-08:00 + + https://angr.io/authors/r0rshark/ + 2018-11-20T15:48:59-08:00 + + https://angr.io/authors/subwire/ + 2018-11-20T15:48:59-08:00 + + https://angr.io/tags/symbion/ + 2018-11-20T15:48:59-08:00 + + https://angr.io/blog/angr_symbion/ + 2018-11-20T15:48:59-08:00 + + https://angr.io/blog/moving_to_angr_8/ + 2018-09-26T14:14:02-07:00 + + https://angr.io/tags/angr8/ + 2018-09-26T14:14:02-07:00 + + https://angr.io/authors/lockshaw/ + 2018-09-26T14:14:02-07:00 + + https://angr.io/tags/release/ + 2018-09-26T14:14:02-07:00 + + https://angr.io/tags/gymrat/ + 2018-01-18T19:41:03-08:00 + + https://angr.io/tags/pyvex/ + 2018-01-18T19:41:03-08:00 + + https://angr.io/blog/throwing_a_tantrum_part_4/ + 2018-01-18T19:41:03-08:00 + + https://angr.io/tags/throwing_a_tantrum/ + 2018-01-18T19:41:03-08:00 + + https://angr.io/tags/cle/ + 2018-01-18T19:41:02-08:00 + + https://angr.io/tags/loader/ + 2018-01-18T19:41:02-08:00 + + https://angr.io/blog/throwing_a_tantrum_part_3/ + 2018-01-18T19:41:02-08:00 + + https://angr.io/tags/archinfo/ + 2018-01-18T19:40:58-08:00 + + https://angr.io/blog/throwing_a_tantrum_part_2/ + 2018-01-18T19:40:58-08:00 + + https://angr.io/tags/internals/ + 2018-01-18T18:51:25-08:00 + + https://angr.io/blog/throwing_a_tantrum_part_1/ + 2018-01-18T18:51:25-08:00 + + https://angr.io/blog/throwing_a_tantrum_index/ + 2018-01-18T18:51:24-08:00 + + https://angr.io/blog/angr_blog_starting_up_again/ + 2018-01-15T15:48:59-08:00 + + https://angr.io/tags/testing/ + 2018-01-15T15:48:59-08:00 + + https://angr.io/blog/new_years_resolutions_2017/ + 2018-01-15T15:35:26-08:00 + + https://angr.io/tags/announcement/ + 2018-01-15T15:35:26-08:00 + + https://angr.io/authors/zardus/ + 2018-01-15T15:35:26-08:00 + + https://angr.io/invite/ + + https://angr.io/top/ + + diff --git a/tags/android/index.html b/tags/android/index.html new file mode 100644 index 0000000..7e1174d --- /dev/null +++ b/tags/android/index.html @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + angr + + + +
+ +

tag: android


+ + +
+
+ experimental java, android, and jni support in angr +
+ angr can now symbolically execute Java code and Android apps! +
+
+ +
+
+ + + + diff --git a/tags/angr8/index.html b/tags/angr8/index.html new file mode 100644 index 0000000..2237ac5 --- /dev/null +++ b/tags/angr8/index.html @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + angr + + + +
+ +

tag: angr8


+ + +
+
+ angr 8 release +
+ Python 3 migration, Clemory refactor, CFGFast optimization, and more +
+
+ +
+
+ + + + diff --git a/tags/announcement/index.html b/tags/announcement/index.html new file mode 100644 index 0000000..047d881 --- /dev/null +++ b/tags/announcement/index.html @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + angr + + + +
+ +

tag: announcement


+ + +
+
+ angr's new year resolutions +
+ After a busy 2016, angr is ready to make some new year resolutions! +
+
+ +
+
+ + + + diff --git a/tags/announcements/index.html b/tags/announcements/index.html new file mode 100644 index 0000000..59390d3 --- /dev/null +++ b/tags/announcements/index.html @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + angr + + + +
+ +

tag: announcements


+ + +
+
+ experimental java, android, and jni support in angr +
+ angr can now symbolically execute Java code and Android apps! +
+
+ + +
+
+ symbion: fusing concrete and symbolic execution +
+ Learn how to symbolically execute real-world binaries by fusing concrete and symbolic execution +
+
+ + +
+
+ angr blog starting up again +
+ After a year inactive, we're back! Join us for tutorials, examples, and announcements in 2018! +
+
+ +
+
+ + + + diff --git a/tags/archinfo/index.html b/tags/archinfo/index.html new file mode 100644 index 0000000..6dca664 --- /dev/null +++ b/tags/archinfo/index.html @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + angr + + + +
+ +

tag: archinfo


+ + +
+
+ throwing a tantrum, part 2: architectures +
+ Teach angr the basics of the BrainFuck architecture through archinfo +
+
+ +
+
+ + + + diff --git a/tags/cle/index.html b/tags/cle/index.html new file mode 100644 index 0000000..d690231 --- /dev/null +++ b/tags/cle/index.html @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + angr + + + +
+ +

tag: cle


+ + +
+
+ throwing a tantrum, part 3: loaders +
+ Learn to go from a file on disk to angr through the magic of loaders +
+
+ +
+
+ + + + diff --git a/tags/extending_angr/index.html b/tags/extending_angr/index.html new file mode 100644 index 0000000..0c52e66 --- /dev/null +++ b/tags/extending_angr/index.html @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + angr + + + +
+ +

tag: extending angr


+ + +
+
+ experimental java, android, and jni support in angr +
+ angr can now symbolically execute Java code and Android apps! +
+
+ + +
+
+ throwing a tantrum, part 4: vex and gymrat +
+ Get a workout translating BrainFuck into the VEX intermediate representation +
+
+ + +
+
+ throwing a tantrum, part 3: loaders +
+ Learn to go from a file on disk to angr through the magic of loaders +
+
+ + +
+
+ throwing a tantrum, part 2: architectures +
+ Teach angr the basics of the BrainFuck architecture through archinfo +
+
+ + +
+
+ throwing a tantrum, part 1: angr internals +
+ Learn the basics of how angr works and how to extend angr to support new architectures +
+
+ + +
+
+ throwing a tantrum +
+ Learn how to extend angr in this n+1 part tutorial! +
+
+ +
+
+ + + + diff --git a/tags/gymrat/index.html b/tags/gymrat/index.html new file mode 100644 index 0000000..cf6c02d --- /dev/null +++ b/tags/gymrat/index.html @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + angr + + + +
+ +

tag: gymrat


+ + +
+
+ throwing a tantrum, part 4: vex and gymrat +
+ Get a workout translating BrainFuck into the VEX intermediate representation +
+
+ +
+
+ + + + diff --git a/tags/index.html b/tags/index.html new file mode 100644 index 0000000..735c205 --- /dev/null +++ b/tags/index.html @@ -0,0 +1,223 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + angr + + + +
+ +

tag:


+ + +
+
+ android +
+ +
+
+ + +
+
+ announcements +
+ +
+
+ + +
+
+ extending_angr +
+ +
+
+ + +
+
+ java +
+ +
+
+ + +
+
+ tutorial +
+ +
+
+ + +
+
+ symbion +
+ +
+
+ + +
+
+ angr8 +
+ +
+
+ + +
+
+ release +
+ +
+
+ + +
+
+ gymrat +
+ +
+
+ + +
+
+ pyvex +
+ +
+
+ + +
+
+ throwing_a_tantrum +
+ +
+
+ + +
+
+ cle +
+ +
+
+ + +
+
+ loader +
+ +
+
+ + +
+
+ archinfo +
+ +
+
+ + +
+
+ internals +
+ +
+
+ + +
+
+ testing +
+ +
+
+ + +
+
+ announcement +
+ +
+
+ +
+
+ + + + diff --git a/tags/internals/index.html b/tags/internals/index.html new file mode 100644 index 0000000..bf700d3 --- /dev/null +++ b/tags/internals/index.html @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + angr + + + +
+ +

tag: internals


+ + +
+
+ throwing a tantrum, part 1: angr internals +
+ Learn the basics of how angr works and how to extend angr to support new architectures +
+
+ +
+
+ + + + diff --git a/tags/java/index.html b/tags/java/index.html new file mode 100644 index 0000000..673ed78 --- /dev/null +++ b/tags/java/index.html @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + angr + + + +
+ +

tag: java


+ + +
+
+ experimental java, android, and jni support in angr +
+ angr can now symbolically execute Java code and Android apps! +
+
+ +
+
+ + + + diff --git a/tags/loader/index.html b/tags/loader/index.html new file mode 100644 index 0000000..982ed92 --- /dev/null +++ b/tags/loader/index.html @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + angr + + + +
+ +

tag: loader


+ + +
+
+ throwing a tantrum, part 3: loaders +
+ Learn to go from a file on disk to angr through the magic of loaders +
+
+ +
+
+ + + + diff --git a/tags/pyvex/index.html b/tags/pyvex/index.html new file mode 100644 index 0000000..38327fa --- /dev/null +++ b/tags/pyvex/index.html @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + angr + + + +
+ +

tag: pyvex


+ + +
+
+ throwing a tantrum, part 4: vex and gymrat +
+ Get a workout translating BrainFuck into the VEX intermediate representation +
+
+ +
+
+ + + + diff --git a/tags/release/index.html b/tags/release/index.html new file mode 100644 index 0000000..811f5ca --- /dev/null +++ b/tags/release/index.html @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + angr + + + +
+ +

tag: release


+ + +
+
+ angr 8 release +
+ Python 3 migration, Clemory refactor, CFGFast optimization, and more +
+
+ +
+
+ + + + diff --git a/tags/symbion/index.html b/tags/symbion/index.html new file mode 100644 index 0000000..7b48b6c --- /dev/null +++ b/tags/symbion/index.html @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + angr + + + +
+ +

tag: symbion


+ + +
+
+ symbion: fusing concrete and symbolic execution +
+ Learn how to symbolically execute real-world binaries by fusing concrete and symbolic execution +
+
+ +
+
+ + + + diff --git a/tags/testing/index.html b/tags/testing/index.html new file mode 100644 index 0000000..0afabf4 --- /dev/null +++ b/tags/testing/index.html @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + angr + + + +
+ +

tag: testing


+ + +
+
+ angr blog starting up again +
+ After a year inactive, we're back! Join us for tutorials, examples, and announcements in 2018! +
+
+ +
+
+ + + + diff --git a/tags/throwing_a_tantrum/index.html b/tags/throwing_a_tantrum/index.html new file mode 100644 index 0000000..f878843 --- /dev/null +++ b/tags/throwing_a_tantrum/index.html @@ -0,0 +1,115 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + angr + + + +
+ +

tag: throwing a tantrum


+ + +
+
+ throwing a tantrum, part 4: vex and gymrat +
+ Get a workout translating BrainFuck into the VEX intermediate representation +
+
+ + +
+
+ throwing a tantrum, part 3: loaders +
+ Learn to go from a file on disk to angr through the magic of loaders +
+
+ + +
+
+ throwing a tantrum, part 2: architectures +
+ Teach angr the basics of the BrainFuck architecture through archinfo +
+
+ + +
+
+ throwing a tantrum, part 1: angr internals +
+ Learn the basics of how angr works and how to extend angr to support new architectures +
+
+ + +
+
+ throwing a tantrum +
+ Learn how to extend angr in this n+1 part tutorial! +
+
+ +
+
+ + + + diff --git a/tags/tutorial/index.html b/tags/tutorial/index.html new file mode 100644 index 0000000..c3c1f3d --- /dev/null +++ b/tags/tutorial/index.html @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + angr + + + +
+ +

tag: tutorial


+ + +
+
+ experimental java, android, and jni support in angr +
+ angr can now symbolically execute Java code and Android apps! +
+
+ + +
+
+ throwing a tantrum, part 4: vex and gymrat +
+ Get a workout translating BrainFuck into the VEX intermediate representation +
+
+ + +
+
+ throwing a tantrum, part 3: loaders +
+ Learn to go from a file on disk to angr through the magic of loaders +
+
+ + +
+
+ throwing a tantrum, part 2: architectures +
+ Teach angr the basics of the BrainFuck architecture through archinfo +
+
+ + +
+
+ throwing a tantrum, part 1: angr internals +
+ Learn the basics of how angr works and how to extend angr to support new architectures +
+
+ + +
+
+ throwing a tantrum +
+ Learn how to extend angr in this n+1 part tutorial! +
+
+ +
+
+ + + + diff --git a/top/index.html b/top/index.html new file mode 100644 index 0000000..11f3e1e --- /dev/null +++ b/top/index.html @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + angr + + + +
+ + + +
+
+ +
+ +
+
+ +
+
+ + + +