<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Eric &#39;Subwire&#39; Gustafson on Eric &#39;Subwire&#39; Gustafson</title>
    <link>https://www.subwire.net/</link>
    <description>Recent content in Eric &#39;Subwire&#39; Gustafson on Eric &#39;Subwire&#39; Gustafson</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-US</language>
    <copyright>&amp;copy; 2019 subwire</copyright>
    <lastBuildDate>Tue, 17 Oct 2023 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://www.subwire.net/index.xml" rel="self" type="application/rss+xml" />
    
    
    
    <item>
      <title>Shimware: Toward Practical Security Retrofitting for Monolithic Firmware Images</title>
      <link>https://www.subwire.net/publication/shimware/</link>
      <pubDate>Tue, 17 Oct 2023 00:00:00 +0000</pubDate>
      
      <guid>https://www.subwire.net/publication/shimware/</guid>
      <description>&lt;p&gt;Cite it:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-bibtex&#34;&gt;@inproceedings{gustafson2023shimware,
  title={Shimware: Toward Practical Security Retrofitting for Monolithic Firmware Images},
  author={Gustafson, Eric and Grosen, Paul and Redini, Nilo and Jha, Saagar and Continella, Andrea and Wang, Ruoyu and Fu, Kevin and Rampazzi, Sara and Kruegel, Christopher and Vigna, Giovanni},
  booktitle={Proceedings of the 26th International Symposium on Research in Attacks, Intrusions and Defenses},
  pages={32--45},
  year={2023}
}
&lt;/code&gt;&lt;/pre&gt;
</description>
    </item>
    
    <item>
      <title>HALucinator: Firmware Re-Hosting through Abstraction Layer Emulation</title>
      <link>https://www.subwire.net/publication/halucinator/</link>
      <pubDate>Wed, 12 Aug 2020 00:00:00 +0000</pubDate>
      
      <guid>https://www.subwire.net/publication/halucinator/</guid>
      <description>&lt;p&gt;Cite it:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-bibtex&#34;&gt;@article{ClementsGustafson2020halucinator,
  title={HALucinator: Firmware Re-hosting through Abstraction Layer Emulation},
  author={Clements, Abraham and Gustafson, Eric and Scharnowski, Tobias and Grosen, Paul and Fritz, David and Kruegel, Christopher and Vigna, Giovanni and Bagchi, Saurabh and Payer, Mathias},
  booktitle={Proceedings of the 29th USENIX Security Symposium (USENIX &#39;20)},
  year={2020},
  organization={USENIX Association}
}
&lt;/code&gt;&lt;/pre&gt;
</description>
    </item>
    
    <item>
      <title>SYMBION: Interleaving Symbolic with Concrete Execution</title>
      <link>https://www.subwire.net/publication/symbion/</link>
      <pubDate>Sat, 27 Jun 2020 00:00:00 +0000</pubDate>
      
      <guid>https://www.subwire.net/publication/symbion/</guid>
      <description>&lt;p&gt;Cite it:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-bibtex&#34;&gt;@inproceedings{gritti2020_symbion,
  title     = {{SYMBION: Interleaving Symbolic with Concrete Execution}},
  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},
  year      = {2020}
}
&lt;/code&gt;&lt;/pre&gt;
</description>
    </item>
    
    <item>
      <title>Toward the Analysis of Embedded Firmware through Automated Re-hosting</title>
      <link>https://www.subwire.net/publication/pretender/</link>
      <pubDate>Tue, 24 Sep 2019 00:00:00 +0000</pubDate>
      
      <guid>https://www.subwire.net/publication/pretender/</guid>
      <description>&lt;p&gt;Cite it:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-bibtex&#34;&gt;@article{gustafson2019pretender,
  title={Toward the Analysis of Embedded Firmware through Automated Re-hosting},
  author={Gustafson, Eric and Muench, Marius and Spensky, Chad and and Redini, Nilo and Machiry, Aravind and Francillon, Aurelien and Balzarotti, Davide and Choe, Yung Ryn and Kruegel, Christopher and Vigna, Giovanni},
  booktitle={2019 International Symposium on Resarch in Attacks, Intrusions, and Defenses (RAID &#39;19)},
  year={2019},
  organization={USENIX Association}
}
&lt;/code&gt;&lt;/pre&gt;
</description>
    </item>
    
    <item>
      <title>Towards Automatically Generating a Sound and Complete Dataset for Evaluating Static Analysis Tools</title>
      <link>https://www.subwire.net/publication/autofacts/</link>
      <pubDate>Tue, 12 Feb 2019 00:00:00 +0000</pubDate>
      
      <guid>https://www.subwire.net/publication/autofacts/</guid>
      <description>&lt;p&gt;Cite it:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-bibtex&#34;&gt;@article{machirytowards,
  title={Towards Automatically Generating a Sound and Complete Dataset for Evaluating Static Analysis Tools},
  author={Machiry, Aravind and Redini, Nilo and Gustafson, Eric and Aghakhani, Hojjat and Kruegel, Christopher and Vigna, Giovanni}
  booktitle={2019 $\{$NDSS$\}$ Workshop on Binary Analysis Research ($\{$BAR$\}$ 19)},
  year={2017},
  organization={Internet Society}
}

}
&lt;/code&gt;&lt;/pre&gt;
</description>
    </item>
    
    <item>
      <title>Think Outside the Dataset: Finding Fraudulent Reviews using Cross-Dataset Analysis</title>
      <link>https://www.subwire.net/publication/onereview/</link>
      <pubDate>Fri, 01 Feb 2019 00:00:00 +0000</pubDate>
      
      <guid>https://www.subwire.net/publication/onereview/</guid>
      <description>&lt;p&gt;Cite it:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-bibtex&#34;&gt;@inproceedings{nilizadeh2019think,
  title={Think Outside the Dataset: Finding Fraudulent Reviews using Cross-Dataset Analysis},
  author={Nilizadeh, Shirin and Aghakhani, Hojjat and Gustafson, Eric and Kruegel, Christopher and Vigna, Giovanni},
  booktitle={The World Wide Web Conference},
  pages={3108--3115},
  year={2019},
  organization={ACM}
}
&lt;/code&gt;&lt;/pre&gt;
</description>
    </item>
    
    <item>
      <title>Using Loops For Malware Classification Resilient to Feature-unaware Perturbations</title>
      <link>https://www.subwire.net/publication/loopmc/</link>
      <pubDate>Sat, 01 Dec 2018 00:00:00 +0000</pubDate>
      
      <guid>https://www.subwire.net/publication/loopmc/</guid>
      <description>&lt;p&gt;Cite it:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-bibtex&#34;&gt;@inproceedings{machiry2018using,
  title={Using Loops For Malware Classification Resilient to Feature-unaware Perturbations},
  author={Machiry, Aravind and Redini, Nilo and Gustafson, Eric and Fratantonio, Yanick and Choe, Yung Ryn and Kruegel, Christopher and Vigna, Giovanni},
  booktitle={Proceedings of the 34th Annual Computer Security Applications Conference},
  pages={112--123},
  year={2018},
  organization={ACM}
}
&lt;/code&gt;&lt;/pre&gt;
</description>
    </item>
    
    <item>
      <title>Exploitation and mitigation of authentication schemes based on device-public information</title>
      <link>https://www.subwire.net/publication/flauth/</link>
      <pubDate>Fri, 01 Dec 2017 00:00:00 +0000</pubDate>
      
      <guid>https://www.subwire.net/publication/flauth/</guid>
      <description>&lt;p&gt;Cite it:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-bibtex&#34;&gt;@inproceedings{bianchi2017exploitation,
  title={Exploitation and mitigation of authentication schemes based on device-public information},
  author={Bianchi, Antonio and Gustafson, Eric and Fratantonio, Yanick and Kruegel, Christopher and Vigna, Giovanni},
  booktitle={Proceedings of the 33rd Annual Computer Security Applications Conference},
  pages={16--27},
  year={2017},
  organization={ACM}
}
&lt;/code&gt;&lt;/pre&gt;
</description>
    </item>
    
    <item>
      <title>BootStomp: On the Security of Mobile Bootloaders</title>
      <link>https://www.subwire.net/publication/bootstomp/</link>
      <pubDate>Sat, 12 Aug 2017 00:00:00 +0000</pubDate>
      
      <guid>https://www.subwire.net/publication/bootstomp/</guid>
      <description>&lt;p&gt;Cite it:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-bibtex&#34;&gt;@inproceedings {203844,
author = {Nilo Redini and Aravind Machiry and Dipanjan Das and Yanick Fratantonio and Antonio Bianchi and Eric Gustafson and Yan Shoshitaishvili and Christopher Kruegel and Giovanni Vigna},
title = {BootStomp: On the Security of Bootloaders in Mobile Devices},
booktitle = {26th {USENIX} Security Symposium ({USENIX} Security 17)},
year = {2017},
address = {Vancouver, BC},
url = {https://www.usenix.org/conference/usenixsecurity17/technical-sessions/presentation/redini},
publisher = {{USENIX} Association},
}
&lt;/code&gt;&lt;/pre&gt;
</description>
    </item>
    
    <item>
      <title>Shell We Play A Game? CTF-as-a-service for Security Education</title>
      <link>https://www.subwire.net/publication/swpag/</link>
      <pubDate>Sat, 12 Aug 2017 00:00:00 +0000</pubDate>
      
      <guid>https://www.subwire.net/publication/swpag/</guid>
      <description>&lt;p&gt;Cite it:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-bibtex&#34;&gt;@inproceedings{trickel2017shell,
  title={Shell We Play A Game? CTF-as-a-service for Security Education},
  author={Trickel, Erik and Disperati, Francesco and Gustafson, Eric and Kalantari, Faezeh and Mabey, Mike and Tiwari, Naveen and Safaei, Yeganeh and Doup{\&#39;e}, Adam and Vigna, Giovanni},
  booktitle={2017 $\{$USENIX$\}$ Workshop on Advances in Security Education ($\{$ASE$\}$ 17)},
  year={2017},
  organization={USENIX$\}$ Association$\}$}
}
&lt;/code&gt;&lt;/pre&gt;
</description>
    </item>
    
    <item>
      <title>Throwing a Tantrum: Part 1: Basic angr internals</title>
      <link>https://www.subwire.net/post/angr_tutorial_1/</link>
      <pubDate>Mon, 20 Mar 2017 12:00:00 +0000</pubDate>
      
      <guid>https://www.subwire.net/post/angr_tutorial_1/</guid>
      <description>&lt;p&gt;In this n+1-part series, we will be exploring how you can extend &lt;a href=&#34;http://angr.io/&#34; title=&#34;angr&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;angr&lt;/a&gt;
 with new features, without editing angr itself!&lt;/p&gt;
&lt;p&gt;angr is the popular framework for analyzing binary programs, from embedded firmware, to hardcore CTF challenges, all from the comfort of Python.
angr&amp;rsquo;s roots lie in the Valgrind VEX instrumentation framework, meaning it benefits from the multi-architecture support and community maintenanace.
However, we live in a big world full of crazy things that aren&amp;rsquo;t Intel or ARM-based Linux machines.&lt;/p&gt;
&lt;p&gt;What about microcontrollers?&lt;/p&gt;
&lt;p&gt;What about Android bytecode?&lt;/p&gt;
&lt;p&gt;What about Javascript?&lt;/p&gt;
&lt;p&gt;What about &lt;em&gt;&lt;strong&gt;BrainFuck&lt;/strong&gt;&lt;/em&gt;??&lt;/p&gt;
&lt;p&gt;(&lt;em&gt;gasp&lt;/em&gt;! Not BrainFuck! Anything but BrainFuck!)&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;In order to not overcomplicate things, and make the core ideas clear, we&amp;rsquo;re going to start with something conceptually simple.&lt;/p&gt;
&lt;p&gt;Sorry, that BrainFuck thing was not a joke.
In this guide, we&amp;rsquo;re going to build the most insanely overkill BrainFuck analysis platform ever constructed.  By the time you&amp;rsquo;re done here, you&amp;rsquo;ll be able to totally obliterate any of the Brainfuck crack-me programs that I hear may even actually exist.&lt;/p&gt;
&lt;p&gt;First, let&amp;rsquo;s go over the components themselves, and how they fit together.&lt;/p&gt;
&lt;h2 id=&#34;the-angr-lifecycle&#34;&gt;The angr lifecycle&lt;/h2&gt;
&lt;p&gt;**&lt;em&gt;TODO: FIXME: BOUNTY: I&amp;rsquo;ll pay $10 to the guy or gal that makes me a sweet diagram here&lt;/em&gt;  **&lt;/p&gt;
&lt;p&gt;If you&amp;rsquo;ve used angr before, you&amp;rsquo;ve probably done this:
(blatantly stolen from angr-doc&amp;rsquo;s fauxware example)&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-python&#34;&gt;import angr
p = angr.Project(&amp;quot;crackme&amp;quot;)
state = p.factory.entry_state()
path = p.factory.path(state)
pathgroup = p.factory.path_group(path)
pathgroup.step(until=lambda lpg: len(lpg.active) &amp;gt; 1)
input_0 = pathgroup.active[0].state.posix.dumps(0)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;That&amp;rsquo;s only a few lines, but there&amp;rsquo;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.&lt;/p&gt;
&lt;h3 id=&#34;cle-the-loader&#34;&gt;CLE, the loader&lt;/h3&gt;
&lt;p&gt;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&amp;rsquo;s in, take a guess as what architecture it&amp;rsquo;s for, and create a representation of the program&amp;rsquo;s memory map, as if the real loader had been used.
CLE supports a set of &amp;ldquo;backends&amp;rdquo;, 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 (&lt;code&gt;Loader.main_bin&lt;/code&gt;) and any libraries.&lt;/p&gt;
&lt;h3 id=&#34;archinfo-the-architecture-db&#34;&gt;Archinfo, the architecture DB&lt;/h3&gt;
&lt;p&gt;During CLE&amp;rsquo;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 &lt;code&gt;Arch&lt;/code&gt; 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.&lt;/p&gt;
&lt;h3 id=&#34;simuvex-the-simulated-executer&#34;&gt;SimuVEX, the simulated executer&lt;/h3&gt;
&lt;p&gt;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&amp;rsquo;s &lt;em&gt;state&lt;/em&gt;&amp;ndash; a snapshot of the registers, memory, and so on&amp;ndash; do some thing to it, usually a basic block&amp;rsquo;s worth of instructions, and produce a set of &lt;em&gt;successors&lt;/em&gt;, coresponding to all the possible program states that can be reached by executing the current block.
When branches are encountered, they collect &lt;em&gt;constraints&lt;/em&gt; on the state, that influence how to take each path of the branch.
In aggregate, this is what gives angr it&amp;rsquo;s reasoning power.&lt;/p&gt;
&lt;h3 id=&#34;pyvex-the-lifter&#34;&gt;PyVEX, the lifter&lt;/h3&gt;
&lt;p&gt;angr&amp;rsquo;s default engine, SimEngineVEX, supports many architectures, simply because it doesn&amp;rsquo;t run on their machine code directly. It uses an intermediate representation, known as VEX, which machine code is translated (&lt;em&gt;lifted&lt;/em&gt;) into.
As an alternative to creating your own engine for a new architecture, if it is similar enough to a &amp;ldquo;normal&amp;rdquo; PC architecture, the faster solution is to simply create a Lifter for it, allowing SimEngineVEX to take care of therest.
We will explore both Lifters and Engines in this guide.&lt;/p&gt;
&lt;h2 id=&#34;claripy-the-solver&#34;&gt;Claripy, the solver&lt;/h2&gt;
&lt;p&gt;Every action an engine erforms, even something as simple as incrementing the program counter, is not necessarily an operation on a concrete value.
The value could instead be a complex expression, that when computed on, should actually result in an even bigger expression.
Creating, composing, and eventually solving these is Claripy&amp;rsquo;s job.
Claripy uses a SMT-solver, currently Microsoft&amp;rsquo;s Z3, to do all of this heavy-lifting.
Thankfully, we won&amp;rsquo;t need to delve into that in this series, as SMT-solving is some serious black magic.&lt;/p&gt;
&lt;h2 id=&#34;simos-the-rest-of-the-nasty-bits&#34;&gt;SimOS, the rest of the nasty bits&lt;/h2&gt;
&lt;p&gt;If we just view the engine&amp;rsquo;s work on a program from the states it provides, we&amp;rsquo;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&amp;rsquo;t exist at the bare machine level.
Therefore, SimOS&amp;rsquo; 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 &lt;em&gt;SimProcedures&lt;/em&gt;
These make angr dramatically faster and more compatible, as symbolically executing libc itself is, to say the least, insanely painful.&lt;/p&gt;
&lt;h3 id=&#34;angr-the-real-deal&#34;&gt;angr, the real deal&lt;/h3&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;In the next part, we&amp;rsquo;ll intro our chosen architecture, BrainFuck, and discuss the implementation of additional architectures.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>BOOMERANG: Exploiting the Semantic Gap in Trusted Execution Environments</title>
      <link>https://www.subwire.net/publication/boomerang/</link>
      <pubDate>Wed, 01 Mar 2017 00:00:00 +0000</pubDate>
      
      <guid>https://www.subwire.net/publication/boomerang/</guid>
      <description>&lt;p&gt;Cite it:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-bibtex&#34;&gt;@inproceedings{machiry2017boomerang,
  title={BOOMERANG: Exploiting the Semantic Gap in Trusted Execution Environments},
  author={Machiry, Aravind and Gustafson, Eric and Spensky, Chad and Salls, Christopher and Stephens, Nick and Wang, Ruoyu and Bianchi, Antonio and Choe, Yung Ryn and Kruegel, Christopher and Vigna, Giovanni},
  booktitle={Proceedings of the Network and Distributed System Security Symposium},
  year={2017}
}
&lt;/code&gt;&lt;/pre&gt;
</description>
    </item>
    
  </channel>
</rss>
