<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>IU CTF Tools</title>
    <description>We write/keep awesome instructions for the tools that IU CTF works on.
</description>
    <link>https://iuctf.github.io/</link>
    <atom:link href="https://iuctf.github.io/feed.xml" rel="self" type="application/rss+xml"/>
    <pubDate>Thu, 11 Feb 2021 01:33:23 +0000</pubDate>
    <lastBuildDate>Thu, 11 Feb 2021 01:33:23 +0000</lastBuildDate>
    <generator>Jekyll v3.9.0</generator>
    
      <item>
        <title>More tricks on radare2</title>
        <description>&lt;h2 id=&quot;more-tricks-on-radare2-cheat-sheet&quot;&gt;More tricks on Radare2 (Cheat Sheet)&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;Cheat Sheet that we found on the web:
&lt;a href=&quot;https://github.com/pwntester/cheatsheets/blob/master/radare2.md&quot;&gt;https://github.com/pwntester/cheatsheets/blob/master/radare2.md&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We try to keep all the useful tricks of Radare2 here.&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Why do we put “@” in front of a register when we inspect it via “pxq”, “ps”,
“pdf” and so on?
    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;It is because the print commands starting with the letter 'p' reads all the
memory addresses starting from the beginning (0x0) of VM address.
The p? commands without using @ will print out way more than a user expects
in the radare2 screen. That's why radare2 gives a warning of this.
The @ sign in front of a register tells the p? commands to read from the
address where the register is pointing to for now.
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;What are local_4h, local_8h, …?
    &lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;They are representing the &lt;span class=&quot;nb&quot;&gt;local &lt;/span&gt;variables pointing the address
4/8/... bytes less than the &lt;span class=&quot;s2&quot;&gt;&quot;rbp&quot;&lt;/span&gt; register
local_4h &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; rbp-4
local_12h &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; rbp-0x12 or rbp-18
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
&lt;/ol&gt;
</description>
        <pubDate>Thu, 29 Jun 2017 20:42:20 +0000</pubDate>
        <link>https://iuctf.github.io/radare2/2017/06/29/more-tricks-on-radare2.html</link>
        <guid isPermaLink="true">https://iuctf.github.io/radare2/2017/06/29/more-tricks-on-radare2.html</guid>
        
        
        <category>radare2</category>
        
      </item>
    
      <item>
        <title>Modern Binary Exploitation</title>
        <description>&lt;h2 id=&quot;useful-binary-expolitation-websites&quot;&gt;Useful binary expolitation websites:&lt;/h2&gt;
&lt;h3 id=&quot;modern-binary-exploitation&quot;&gt;Modern Binary Exploitation&lt;/h3&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;http://security.cs.rpi.edu/courses/binexp-spring2015/&quot;&gt;http://security.cs.rpi.edu/courses/binexp-spring2015/&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/RPISEC/HackTheVote&quot;&gt;https://github.com/RPISEC/HackTheVote&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
        <pubDate>Mon, 12 Jun 2017 00:00:00 +0000</pubDate>
        <link>https://iuctf.github.io/talks/2017/06/12/binary-exploitation.html</link>
        <guid isPermaLink="true">https://iuctf.github.io/talks/2017/06/12/binary-exploitation.html</guid>
        
        
        <category>talks</category>
        
      </item>
    
      <item>
        <title>Raspberry Pi training in Camp CircleCity</title>
        <description>&lt;h2 id=&quot;raspberry-pi-training-in-camp-circlecity&quot;&gt;Raspberry Pi Training in Camp CircleCity&lt;/h2&gt;

&lt;p&gt;The &lt;a href=&quot;https://circlecitycon.com/camp-circle-events/&quot;&gt;Circle City Con 4.0&lt;/a&gt; was
held on June 9-11, 2017. It was not a practical training course but I found
that the materials in the course can be useful for the team.&lt;br /&gt;
Here are useful materials that I have learned in the training.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://iu.box.com/s/k54zrmzdmjstlg9qlejdx75l1w0ce381&quot;&gt;Basic Pi&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://iu.box.com/s/xf74bznz7owyj6i3fnv0ltinob8ym1oh&quot;&gt;Advanced Raspberry Pi&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
        <pubDate>Fri, 09 Jun 2017 00:00:00 +0000</pubDate>
        <link>https://iuctf.github.io/talks/2017/06/09/CCC-raspberry-pi.html</link>
        <guid isPermaLink="true">https://iuctf.github.io/talks/2017/06/09/CCC-raspberry-pi.html</guid>
        
        
        <category>talks</category>
        
      </item>
    
      <item>
        <title>NSA Software Exploitation Course &amp; Codebreaker Challenge</title>
        <description>&lt;h2 id=&quot;nsa-software-exploitation-course--codebreaker-challenge&quot;&gt;NSA Software Exploitation Course &amp;amp; Codebreaker Challenge&lt;/h2&gt;

&lt;p&gt;The NSA is tired of doing all the work and has provided resources for us to learn to do things ourselves.  Check out lectures from their course on software exploitation.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://codebreaker.ltsnet.net/resources&quot;&gt;https://codebreaker.ltsnet.net/resources&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This page will be updated with writeups as team members work on the practice problems.&lt;/p&gt;
</description>
        <pubDate>Thu, 08 Jun 2017 00:00:00 +0000</pubDate>
        <link>https://iuctf.github.io/talks/2017/06/08/nsa-codebreaker.html</link>
        <guid isPermaLink="true">https://iuctf.github.io/talks/2017/06/08/nsa-codebreaker.html</guid>
        
        
        <category>talks</category>
        
      </item>
    
      <item>
        <title>Playing with radare2</title>
        <description>&lt;h2 id=&quot;playing-with-radare2-to-dig-into-the-cmu-bombs&quot;&gt;Playing with radare2 to dig into the CMU Bombs&lt;/h2&gt;

&lt;p&gt;We try to crack the cyber security bombs posted on CMU by using radare2.&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;http://csapp.cs.cmu.edu/3e/labs.html&quot;&gt;http://csapp.cs.cmu.edu/3e/labs.htm&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://radare.gitbooks.io/radare2book/content/refcard/intro.html&quot;&gt;https://radare.gitbooks.io/radare2book/content/refcard/intro.html&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
  &lt;li&gt;Inspect the binary code in brief
    &lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;18:45] CREST-MacBook-Pro-2: bomb &lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;rabin2 &lt;span class=&quot;nt&quot;&gt;-I&lt;/span&gt; bomb
&lt;span class=&quot;nb&quot;&gt;arch     &lt;/span&gt;x86
binsz    26406
bintype  elf
bits     64
canary   &lt;span class=&quot;nb&quot;&gt;true
&lt;/span&gt;class    ELF64
crypto   &lt;span class=&quot;nb&quot;&gt;false
&lt;/span&gt;endian   little
havecode &lt;span class=&quot;nb&quot;&gt;true
&lt;/span&gt;intrp    /lib64/ld-linux-x86-64.so.2
lang     c
linenum  &lt;span class=&quot;nb&quot;&gt;true
&lt;/span&gt;lsyms    &lt;span class=&quot;nb&quot;&gt;true
&lt;/span&gt;machine  AMD x86-64 architecture
maxopsz  16
minopsz  1
nx       &lt;span class=&quot;nb&quot;&gt;true
&lt;/span&gt;os       linux
pcalign  0
pic      &lt;span class=&quot;nb&quot;&gt;false
&lt;/span&gt;relocs   &lt;span class=&quot;nb&quot;&gt;true
&lt;/span&gt;relro    partial relro
rpath    NONE
static   &lt;span class=&quot;nb&quot;&gt;false
&lt;/span&gt;stripped &lt;span class=&quot;nb&quot;&gt;false
&lt;/span&gt;subsys   linux
va       &lt;span class=&quot;nb&quot;&gt;true&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;18:45] CREST-MacBook-Pro-2: bomb &lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;rabin2 &lt;span class=&quot;nt&quot;&gt;-l&lt;/span&gt; bomb
&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;Linked libraries]
libc.so.6
1 library
&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;18:45] CREST-MacBook-Pro-2: bomb &lt;span class=&quot;err&quot;&gt;$&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;Load up the binary code in radare2
    &lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;18:45] CREST-MacBook-Pro-2: bomb &lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;r2 bomb
syntax error: error &lt;span class=&quot;k&quot;&gt;in &lt;/span&gt;error handling
syntax error: error &lt;span class=&quot;k&quot;&gt;in &lt;/span&gt;error handling
syntax error: error &lt;span class=&quot;k&quot;&gt;in &lt;/span&gt;error handling
 &lt;span class=&quot;nt&quot;&gt;--&lt;/span&gt; THIS IS NOT A BUG
&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;0x00400c90]&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;Cheat Sheet
    &lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;// Package Manager
r2pm init
r2pm update
//Install www-m &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;material webui&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;:
r2pm &lt;span class=&quot;nt&quot;&gt;-i&lt;/span&gt; www-m
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
    &lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;// General information about a file
rabin2 &lt;span class=&quot;nt&quot;&gt;-I&lt;/span&gt; &amp;lt;file&amp;gt;
&lt;span class=&quot;nt&quot;&gt;-l&lt;/span&gt; - dynamic libs
&lt;span class=&quot;nt&quot;&gt;-i&lt;/span&gt; - symbols
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
    &lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;// Load the binary code
r2 &amp;lt;binary_code&amp;gt;
aa - automatic analysis
afl - look at symbols and functions
s - seek to &amp;lt;symbol&amp;gt;
pdf - print disassembly of a &lt;span class=&quot;k&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;e.g. pdf @ main&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
V - enter visual mode, press V again to enter graph mode
hjkl - navigation
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
&lt;/ol&gt;
</description>
        <pubDate>Mon, 05 Jun 2017 22:48:20 +0000</pubDate>
        <link>https://iuctf.github.io/radare2/2017/06/05/playing-with-radare2.html</link>
        <guid isPermaLink="true">https://iuctf.github.io/radare2/2017/06/05/playing-with-radare2.html</guid>
        
        
        <category>radare2</category>
        
      </item>
    
      <item>
        <title>Running Unicorn, Capstone and Keystone on Docker</title>
        <description>&lt;h2 id=&quot;running-unicorn-capstone-and-keystone-on-docker&quot;&gt;Running Unicorn, Capstone and Keystone on Docker&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/dikim33/unicorn.git&quot;&gt;https://github.com/dikim33/unicorn.git&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is how I setup Docker for Unicorn, Capstone, and Keystone.&lt;/p&gt;
&lt;ol&gt;
  &lt;li&gt;Get the Dockerfile and some test files from my forked github
    &lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;git clone https://github.com/dikim33/unicorn.git uck 
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;Build a docker image with the given Dockerfile
    &lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nb&quot;&gt;cd &lt;/span&gt;uck
docker build &lt;span class=&quot;nt&quot;&gt;-t&lt;/span&gt; &amp;lt;image_name&amp;gt; &lt;span class=&quot;nb&quot;&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;Run the challenge file
    &lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;docker run &lt;span class=&quot;nt&quot;&gt;--rm&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-it&lt;/span&gt; &amp;lt;image_name&amp;gt; uck/challenge.py uck/challenge.asm
docker run &lt;span class=&quot;nt&quot;&gt;--rm&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-it&lt;/span&gt; &amp;lt;image_name&amp;gt; python uck/example_capstone.py
docker run &lt;span class=&quot;nt&quot;&gt;--rm&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-it&lt;/span&gt; &amp;lt;image_name&amp;gt; python uck/example_keystone.py
docker run &lt;span class=&quot;nt&quot;&gt;--rm&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-it&lt;/span&gt; &amp;lt;image_name&amp;gt; python uck/example_unicorn.py
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
&lt;/ol&gt;
</description>
        <pubDate>Sun, 28 May 2017 01:56:10 +0000</pubDate>
        <link>https://iuctf.github.io/unicorn/2017/05/28/running-unicorn-capstone-keystone-on-docker.html</link>
        <guid isPermaLink="true">https://iuctf.github.io/unicorn/2017/05/28/running-unicorn-capstone-keystone-on-docker.html</guid>
        
        
        <category>unicorn</category>
        
      </item>
    
      <item>
        <title>Integration with Keystone and Capstone</title>
        <description>&lt;h2 id=&quot;integration-with-keystone-and-capstone&quot;&gt;Integration with Keystone and Capstone&lt;/h2&gt;

&lt;p&gt;When &lt;strong&gt;Unicorn&lt;/strong&gt; is integrated with Keystone and Capstone, it becomes even more useful for the reverse engineering.&lt;/p&gt;
&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/l_rGk-Z-L-0?ecver=1&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;
&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/0-i9LAubKRs?ecver=1&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;
</description>
        <pubDate>Sun, 28 May 2017 00:28:15 +0000</pubDate>
        <link>https://iuctf.github.io/unicorn/2017/05/28/integration-with-keystone-and-capstone.html</link>
        <guid isPermaLink="true">https://iuctf.github.io/unicorn/2017/05/28/integration-with-keystone-and-capstone.html</guid>
        
        
        <category>unicorn</category>
        
      </item>
    
      <item>
        <title>Installation/Configuration of Unicorn</title>
        <description>&lt;h2 id=&quot;installationconfiguration-of-unicorn&quot;&gt;Installation/Configuration of Unicorn&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Unicorn&lt;/strong&gt; can be installed in OSX (Sierra), Linux, and Windows. I have installed it on OSX and Linux.
I will leave some workarounds that I used to manage the unexpected hiccups during the installation in OSX and Linux.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Unicorn official website: &lt;a href=&quot;http://www.unicorn-engine.org/&quot;&gt;http://www.unicorn-engine.org/&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Test codes: http://www.unicorn-engine.org/samples/test1.tgz&lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Installation: &lt;a href=&quot;https://github.com/unicorn-engine/unicorn/blob/master/docs/COMPILE.md&quot;&gt;https://github.com/unicorn-engine/unicorn/blob/master/docs/COMPILE.md&lt;/a&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;OSX&lt;/strong&gt;&lt;br /&gt;
There is an issue on testing with unicorn.
    &lt;div class=&quot;language-python highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;21&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;03&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;149&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;161&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;212&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;7&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;test1&lt;/span&gt; &lt;span class=&quot;err&quot;&gt;$&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;make&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;cc&lt;/span&gt;  &lt;span class=&quot;n&quot;&gt;test1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;c&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;L&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;usr&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;local&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Cellar&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;glib&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;2.52&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;lib&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;L&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;usr&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;local&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;opt&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;gettext&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;lib&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;lglib&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;2.0&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;lintl&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;lpthread&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;lm&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;lunicorn&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;o&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;test1&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;test1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;c&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;fatal&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;error&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;'unicorn/unicorn.h'&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;file&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;not&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;found&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;#include &amp;lt;unicorn/unicorn.h&amp;gt;
&lt;/span&gt;       &lt;span class=&quot;o&quot;&gt;^&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;error&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;generated&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;make&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;***&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;test1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Error&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
    &lt;p&gt;It requires clang of XCode. In order to get the clang, make sure that XCode is installed with the “Command Line Tools”.&lt;br /&gt;
As &lt;a href=&quot;http://railsapps.github.io/xcode-command-line-tools.html&quot;&gt;The useful link of installation of “Command Line Tools”&lt;/a&gt; mentions,
&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;xcode-select --install&lt;/code&gt; did not work for me because it kept failing to get the
“Command Line Tools” due to the network issues. My network was just fine but it
seemed that my MBP could not get the “Command Line Tools” from the Apple App Store.
So, I just downloaded the “Command Line Tools” dmg file from &lt;a href=&quot;https://developer.apple.com/downloads/more&quot;&gt;here&lt;/a&gt; as the above link suggests.
Other than this, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;brew install unicorn&lt;/code&gt; made unicorn works just fine based on the &lt;a href=&quot;http://www.unicorn-engine.org/docs/tutorial.html&quot;&gt;unicorn tutorials&lt;/a&gt;.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Linux&lt;/strong&gt;&lt;br /&gt;
So far I did not have any issues with the &lt;a href=&quot;https://github.com/unicorn-engine/unicorn/blob/master/docs/COMPILE-NIX.md&quot;&gt;github version&lt;/a&gt;.
&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;UNICORN_ARCHS=&quot;arm aarch64 x86&quot; ./make.sh&lt;/code&gt;
I lied! There was an issue on ubuntu-16.04 (cc-5.4.0) which does not compile the unicorn test codes without “-pthread” option.
So, the workaround is that we have to put the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;-pthread&lt;/code&gt; option in the Makefile or add it on the fly.
The test codes that I played with is in &lt;a href=&quot;http://www.unicorn-engine.org/samples/test1.tgz&quot;&gt;here&lt;/a&gt;.
I realized that this option is not necessary in Debian-8 (cc-4.9.5). It may not be necessary for the other distros either.
Please check it out.&lt;/li&gt;
&lt;/ul&gt;
</description>
        <pubDate>Thu, 25 May 2017 18:30:13 +0000</pubDate>
        <link>https://iuctf.github.io/unicorn/2017/05/25/installation-of-unicorn.html</link>
        <guid isPermaLink="true">https://iuctf.github.io/unicorn/2017/05/25/installation-of-unicorn.html</guid>
        
        
        <category>unicorn</category>
        
      </item>
    
      <item>
        <title>Introduction to Unicorn</title>
        <description>&lt;h2 id=&quot;introduction-to-unicorn&quot;&gt;Introduction to Unicorn&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Unicorn&lt;/strong&gt; is an open source CPU emulator based on QEMU.&lt;/p&gt;

&lt;p&gt;Nice features that I would like to share (&lt;em&gt;quoted from &lt;a href=&quot;http://www.unicorn-engine.org/docs/beyond_qemu.html&quot;&gt;the unicorn page&lt;/a&gt;&lt;/em&gt;):&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;Framework: QEMU is a set of emulators, but not a framework. Therefore, you
cannot build your own tools on top of QEMU, while this is the main purpose of
Unicorn.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Flexible: QEMU cannot emulate a chunk of raw binary code without any context:
it requires either a proper executable binary (for example, a file in ELF
format), or a whole system image with a full OS inside. Meanwhile, Unicorn
just focuses on CPU operations, and can emulate raw code without context&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Instrumentation: QEMU does not support dynamic instrumentation, but with
Unicorn you can register customized handlers for various kind of events from
CPU execution to memory access. This feature gives tool programmers all the
power they need to monitor and analyze the code under emulation.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Thread-safe: QEMU cannot handle more than one CPU at the same time. In
contrast, Unicorn is designed and implemented as a framework so that one
program can emulate multiple code of different kinds of CPU in a moment.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Bindings: QEMU does not have binding itself. But as a framework, Unicorn
supports multiple bindings on top of the core written in C. This makes it
easy to be adopted by developers. A rich list of efficient bindings - 4
languages have been supported in version 0.9 - lowers the barrier for every
programmer.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Lightweight: Unicorn is much more lightweight than QEMU because we stripped
all the subsystems that do not involve in CPU emulation. As a result, Unicorn
is less than 10 times smaller in size and also in memory consumption.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Safety: QEMU has a bad track of security record with a lot of vulnerabilities
that can be exploited to break out of the guest. Its history says that all of
these bugs are from subsystems such as devices, BIOS, firmware etc, but none
of them comes from CPU emulator component. Therefore, in principle Unicorn is
much more secure because it has way smaller attack surface.&lt;/p&gt;
  &lt;/li&gt;
&lt;/ul&gt;
</description>
        <pubDate>Tue, 23 May 2017 22:49:37 +0000</pubDate>
        <link>https://iuctf.github.io/unicorn/2017/05/23/introduction-to-unicorn.html</link>
        <guid isPermaLink="true">https://iuctf.github.io/unicorn/2017/05/23/introduction-to-unicorn.html</guid>
        
        
        <category>unicorn</category>
        
      </item>
    
      <item>
        <title>Welcome to Jekyll!</title>
        <description>&lt;p&gt;You’ll find this post in your &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;_posts&lt;/code&gt; directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;jekyll serve&lt;/code&gt;, which launches a web server and auto-regenerates your site when a file is updated.&lt;/p&gt;

&lt;p&gt;To add new posts, simply add a file in the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;_posts&lt;/code&gt; directory that follows the convention &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;YYYY-MM-DD-name-of-post.ext&lt;/code&gt; and includes the necessary front matter. Take a look at the source for this post to get an idea about how it works.&lt;/p&gt;

&lt;p&gt;Jekyll also offers powerful support for code snippets:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;print_hi&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;Hi, &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;print_hi&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'Tom'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;#=&amp;gt; prints 'Hi, Tom' to STDOUT.&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Check out the &lt;a href=&quot;http://jekyllrb.com/docs/home&quot;&gt;Jekyll docs&lt;/a&gt; for more info on how to get the most out of Jekyll. File all bugs/feature requests at &lt;a href=&quot;https://github.com/jekyll/jekyll&quot;&gt;Jekyll’s GitHub repo&lt;/a&gt;. If you have questions, you can ask them on &lt;a href=&quot;https://talk.jekyllrb.com/&quot;&gt;Jekyll Talk&lt;/a&gt;.&lt;/p&gt;

</description>
        <pubDate>Tue, 23 Feb 2016 22:49:37 +0000</pubDate>
        <link>https://iuctf.github.io/jekyll/update/2016/02/23/welcome-to-jekyll.html</link>
        <guid isPermaLink="true">https://iuctf.github.io/jekyll/update/2016/02/23/welcome-to-jekyll.html</guid>
        
        
        <category>jekyll</category>
        
        <category>update</category>
        
      </item>
    
  </channel>
</rss>
