<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.10.0">Jekyll</generator><link href="https://nautilus.institute/feed.xml" rel="self" type="application/atom+xml" /><link href="https://nautilus.institute/" rel="alternate" type="text/html" /><updated>2026-05-10T01:53:51+00:00</updated><id>https://nautilus.institute/feed.xml</id><title type="html">Nautilus Institute</title><subtitle>Nautilus Institute is the organizing team for the DEF CON 30 and 31 Capture the Flag (CTF) events.</subtitle><entry><title type="html">Axis, EPMD, and You</title><link href="https://nautilus.institute/blog/2025/axis-epmd-and-you/" rel="alternate" type="text/html" title="Axis, EPMD, and You" /><published>2025-08-28T17:33:37+00:00</published><updated>2025-08-28T17:33:37+00:00</updated><id>https://nautilus.institute/blog/2025/axis-epmd-and-you</id><content type="html" xml:base="https://nautilus.institute/blog/2025/axis-epmd-and-you/"><![CDATA[<p><em>This article was originally presented as a lightning talk
during ElixirConf 2025.</em></p>

<p>Axis was a challenge deployed during
DEF CON Capture the Flag finals
on August 9, 2025.
It’s an Elixir Phoenix app,
mostly using Phoenix LiveView as the
user interface layer,
with an intentional
<a href="https://cwe.mitre.org/data/definitions/94.html">CWE-94 Improper Control of Generation of Code</a>
flaw that allows flag disclosure.</p>

<p>Getting it deployed was a gigantic pain.
I spent quite a bit of time fighting
Puppeteer and then Playwright
for browser automation,
Docker’s x86-64 emulator for arm64,
but the most interesting issue was
the
Erlang Port Mapper Daemon, or “EPMD”.</p>

<h1 id="erlang-distribution">Erlang Distribution</h1>

<p>In languages running on the Erlang runtime system
(“ERTS”)
like Erlang and Elixir, 
applications are generally a collection of
small processes running in a single Erlang node.
This Erlang node is normally a single
<code class="language-plaintext highlighter-rouge">beam.smp</code> 
(or just “BEAM,” for “Bogdan’s Erlang Abstract Machine”) 
host process.
You’re encouraged to use high level
abstractions like “generic servers,”
“agents,”
or “finite state machines;”
those abstractions are built on
asynchronous messaging betwen those small processes.
In Elixir, this is done with the
<code class="language-plaintext highlighter-rouge">send(destination, message)</code> function,
which uses the Erlang
<code class="language-plaintext highlighter-rouge">Destination ! Message</code> syntax.
The message can be any Erlang term,
and the destination is
an atom representing a named process on the current node,
an Erlang <code class="language-plaintext highlighter-rouge">Pid</code> (which could be local or remote),
an Erlang <code class="language-plaintext highlighter-rouge">Ref</code> that might be a process alias,
or a pair of <code class="language-plaintext highlighter-rouge">{ProcessName, NodeName}</code>.</p>

<p>What goes into a node name? 
Since they can be on different physical machines,
a network address is going to be part of it.
However, given that a single machine may have
multiple Erlang nodes on it,
instead of letting them fight over well-known ports,
what you really want is for nodes to be named,
take random ports,
and have an independent host process 
map those names to ports.</p>

<h1 id="ctf-infrastructure">CTF Infrastructure</h1>

<p>Nautilus Institute ran our CTF finals
on containers, but with <code class="language-plaintext highlighter-rouge">krun</code>
instead of <code class="language-plaintext highlighter-rouge">runc</code> like normal Docker
to support challenges that bring their own
pwnable kernel.
While <code class="language-plaintext highlighter-rouge">runc</code> does some network and 
process namespacing tricks to let container
guest processes coast off the host’s kernel
for the sake of performance
(Legitimate Business Syndicate had
per-connection containers for quals
starting up in under a second a decade ago),
<code class="language-plaintext highlighter-rouge">krun</code> uses full on virtualization
to let a container guest bring and run in their
own kernel.
We originally looked into this for 
the opportunity to run kernel
challenges a few years back,
and kept it for the better process isolation.</p>

<p>It also lets you do some tricky stuff with networking.
We had a proxy setup that let us restrict VMs
to a single listen socket 
and no outbound sockets 
(to keep teams from replacing a challenge
with a proxy that lets them sidestep our
container patch restrictions).</p>

<h1 id="how-axis-starts">How Axis Starts</h1>

<p>Axis was distributed as a release image
generated through the normal Phoenix
<code class="language-plaintext highlighter-rouge">mix rel</code> process.
Assuming you don’t run into build issues with <code class="language-plaintext highlighter-rouge">prim-tty</code>
while trying to build an x86-64 image on an
arm64 machine,
you get an OCI image that starts a
BEAM process via a bunch of shell scripts.</p>

<ol>
  <li>Shell scripts grab information from environment
variables to set arguments to the
<code class="language-plaintext highlighter-rouge">erl</code> command
that kicks off BEAM, 
which on a modern machine names itself
<code class="language-plaintext highlighter-rouge">beam.smp</code></li>
  <li>The <code class="language-plaintext highlighter-rouge">beam.smp</code> process starts with a
file of arguments for the VM available,
traditionally in a file called
<code class="language-plaintext highlighter-rouge">vm.args</code></li>
  <li>The BEAM process loads VM arguments.</li>
  <li>BEAM kicks off an EPMD process.</li>
  <li>The EPMD process tries to bind
port 4369 on
the zero IP address (i.e. <code class="language-plaintext highlighter-rouge">0:4369</code>, 
every interface).
If that fails, it dies, since that probably means
an EPMD is running and it doesn’t need a second.</li>
  <li>BEAM tries to bind
port 0 on the zero IP (<code class="language-plaintext highlighter-rouge">0:0</code>).
This tells the kernel 
“give me any port that’s available on every interface.”</li>
  <li>BEAM tries to connect to EPMD to
register its name and the port from the previous step.</li>
  <li>BEAM starts running the application.</li>
</ol>

<h1 id="how-to-deploy-a-ctf-challenge">How to Deploy a CTF Challenge</h1>

<p>I started working on Axis in September 2024.
In March 2025 we switched it from a quals to
a finals challenge, 
and in June 2025 I really started finding a route
to finish it.
Because I’ve had a lot of experience with
running Elixir Phoenix apps in containers,
I felt like I could focus on getting it done with
a poller and known proof-of-vulnerability
and not spend a lot of time on integration.
There’s usually time the week of DEF CON for that.</p>

<p>And then I spent two weeks fighting 
(first) Puppeteer and (then) Playwright.
By the time I had a poller I was happy with,
it was Friday afternoon and our infrastructure
team was busy with a bunch of other services.
Some of the issues that popped up in this last
sprint were:</p>

<ul>
  <li>my computer is arm64 and we deploy on x86-64</li>
  <li>this <code class="language-plaintext highlighter-rouge">compose.yml</code> doesn’t do what you want it to
on arm64:
    <div class="language-yaml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="na">services</span><span class="pi">:</span>
  <span class="na">web-prod</span><span class="pi">:</span>
    <span class="na">build</span><span class="pi">:</span>
      <span class="na">context</span><span class="pi">:</span> <span class="s">.</span>
      <span class="na">dockerfile</span><span class="pi">:</span> <span class="s">Dockerfile</span>
    <span class="na">platform</span><span class="pi">:</span> <span class="s">linux/amd64</span>
</code></pre></div>    </div>
  </li>
  <li>the <code class="language-plaintext highlighter-rouge">mix local.hex --force</code> step to install
the normal Elixir package manager doesn’t like
the x86-64 emulator my Docker desktop app runs</li>
  <li>if you make an arm64 machine on EC2 out of habit
it can’t build x86-64 images</li>
  <li>once we got 
a built x86-64 image that the infrastructure could
actually start, 
it would open ports we weren’t expecting
and immediately die</li>
</ul>

<p>We spent a few minutes with <code class="language-plaintext highlighter-rouge">strace</code> trying to solve
this mystery.
The tell-tale sign to put us on the right track was
the <code class="language-plaintext highlighter-rouge">4369</code> <code class="language-plaintext highlighter-rouge">bind</code> call. 
This introduced me to EPMD,
which I’d previously been fuzzy on,
and helped get to the issue that was
killing BEAM before it could open the expected
port <code class="language-plaintext highlighter-rouge">4001</code>.</p>

<p>The rub comes when BEAM tries to bind <code class="language-plaintext highlighter-rouge">0:0</code>.
Because of a bug in our <code class="language-plaintext highlighter-rouge">krun</code> setup,
it would, 
instead of returning <code class="language-plaintext highlighter-rouge">0</code> for success,
it returned a failure condition 
(that we didn’t bother triaging at the time).</p>

<p>I spent a minute trying to coax a couple commercial LLMs
to help,
but then I remembered the
VM arguments concept from a previous job.</p>

<p>After some research
on the
<a href="https://www.erlang.org/doc/apps/erts/erl_cmd.html#flags">flags and arguments for <code class="language-plaintext highlighter-rouge">erl</code></a>
(the command line tool that kicks off BEAM),
I tried a few different combinations of arguments.</p>

<p><code class="language-plaintext highlighter-rouge">--no_epmd</code> on its own didn’t help.
It looks like that requires more configuration
than I was willing to learn about in the rush to deploy.</p>

<p><code class="language-plaintext highlighter-rouge">--dist_listen false</code> did work!
It tells BEAM to just not open a listen port
for distributed Erlang,
and lets the app continue to boot and work.</p>

<p>Once that was in,
we got the poller running
(it was pretty unreliable, 
since I’m either not experienced with browser automation
or browser animation is simply terrible)
at a reliability we were comfortable with,
and decided to enable it in the scoreboard 
and post about it in
<code class="language-plaintext highlighter-rouge">#ctf-announcements-text</code></p>

<p><img src="/images/2025-axis-epmd-and-you/IMG_0546_smol.jpeg" alt="15:11 [NI] Vito: It's not an all-access pass, but you may still want to drop everything to work on the new axis" /></p>

<h1 id="conclusion">Conclusion</h1>

<p>Shout out to the teams that spent time
hacking and patching Axis!
I hope you had fun, 
and I’m glad I was able to finally bring a challenge 
to a CTF at DEF CON,
even if it was web sqli.</p>

<p>Incredible thanks to itszn for your patience with me
getting this disaster out the door.</p>

<p>Finally, huge thanks to Josef! 
Our time riffing on how this would work
and your time helping develop it
are why it happened at all.</p>]]></content><author><name>vito</name></author><category term="2025" /><category term="elixir" /><category term="axis" /><summary type="html"><![CDATA[This article was originally presented as a lightning talk during ElixirConf 2025.]]></summary></entry><entry><title type="html">January 2025 Qualifiers Update</title><link href="https://nautilus.institute/blog/2025/jan-2025-qual-update/" rel="alternate" type="text/html" title="January 2025 Qualifiers Update" /><published>2025-01-07T18:33:37+00:00</published><updated>2025-01-07T18:33:37+00:00</updated><id>https://nautilus.institute/blog/2025/jan-2025-qual-update</id><content type="html" xml:base="https://nautilus.institute/blog/2025/jan-2025-qual-update/"><![CDATA[<p>It’s time for an update about 
how to qualify for DEF CON CTF 2025 Finals.</p>

<p>You can find up-to-date qualifying information
at <a href="https://nautilus.institute/dc2025/">https://nautilus.institute/dc2025/</a> .</p>

<h1 id="qualified-so-far">Qualified So Far</h1>

<p>Four contests have qualified teams so far:</p>

<ol>
  <li><strong>DEF CON CTF 2024 Finals</strong>: 
Maple Mallard Magistrates</li>
  <li><strong><a href="https://ctf2024.hitcon.org">HITCON CTF 2024</a></strong>:
Friendly Maltese Citizens</li>
  <li><strong><a href="https://2024.ctf.link">hxp 38C3 CTF</a></strong>: 
kalmarunionen</li>
  <li><strong><a href="https://ctf.0ops.sjtu.cn/">0ctf</a></strong>:
r3kapig</li>
</ol>

<h1 id="plaid-ctf">Plaid CTF</h1>

<p><strong><a href="https://plaidctf.com/">PlaidCTF</a></strong>,
held April 4 21:00 UTC - April 6 21:00 UTC
will qualify a team for DEF CON CTF 2025 finals.</p>

<h1 id="qualifiers">Qualifiers</h1>

<p>Nautilus Institute will be hosting qualifiers for DEF CON Capture the Flag
starting at midnight UTC at the start of April 12, 2025, 
and ending 48 hours later at
midnight UTC at the start of April 14, 2025.</p>

<p>This contest will qualify 
the remainder of teams we bring to DEF CON.</p>

<p>Registration will open closer to the contest.</p>

<table>
    <thead>
      <th></th>
      <th>epoch</th>
      <th>human</th>
    </thead>
    <tbody>
    <tr class="timetable">
      <th>game start</th>
      <td class="epoch">1744416000</td>
      <td class="human">April 12, 2025 at Midnight UTC</td>
    </tr>
    <tr class="timetable">
      <th>game end</th>
      <td class="epoch">1744588800</td>
      <td class="human">April 14, 2025 at Midnight UTC</td>
    </tr>
    </tbody>
  </table>

<script src="/js/timetable.js" type="text/javascript"></script>]]></content><author><name>vito</name></author><category term="2025" /><category term="defcon-33" /><category term="qualifier" /><summary type="html"><![CDATA[It’s time for an update about how to qualify for DEF CON CTF 2025 Finals.]]></summary></entry><entry><title type="html">DEF CON 32 CTF Final Results</title><link href="https://nautilus.institute/blog/2024/defcon-32-ctf-final-results/" rel="alternate" type="text/html" title="DEF CON 32 CTF Final Results" /><published>2024-09-10T17:33:37+00:00</published><updated>2024-09-10T17:33:37+00:00</updated><id>https://nautilus.institute/blog/2024/defcon-32-ctf-final-results</id><content type="html" xml:base="https://nautilus.institute/blog/2024/defcon-32-ctf-final-results/"><![CDATA[<p>Nautilus Institute ran DEF CON CTF in Las Vegas August 9-11, 2024.
After three days of hardcore hacking,
the Maple Mallard Magistrates once again defended their title.
Congratulations to MMM, 
and to the other teams that qualified for and played in our finals!</p>

<p>If you’re interested in seeing the stream from the LiveCTF mini-tournament that was hosted as a “challenge” within our game, please check out the links on the <a href="https://livectf.com/">LiveCTF website</a>.</p>

<!-- more -->

<p>The full, final scores:</p>

<table>
  <thead>
    <tr>
      <th>Pos</th>
      <th>Team</th>
      <th>Attack</th>
      <th>Defense</th>
      <th>King of the Hill</th>
      <th>LiveCTF</th>
      <th>TOTAL</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>1</td>
      <td>Maple Mallard Magistrates</td>
      <td>3015</td>
      <td>1505</td>
      <td>273</td>
      <td>1150</td>
      <td>5943</td>
    </tr>
    <tr>
      <td>2</td>
      <td>Blue Water</td>
      <td>2575</td>
      <td>769</td>
      <td>409</td>
      <td>1337</td>
      <td>5090</td>
    </tr>
    <tr>
      <td>3</td>
      <td>SuperDiceCode</td>
      <td>1773</td>
      <td>821</td>
      <td>426</td>
      <td>700</td>
      <td>3720</td>
    </tr>
    <tr>
      <td>4</td>
      <td>RepokemonedCollections</td>
      <td>1639</td>
      <td>525</td>
      <td>293</td>
      <td>900</td>
      <td>3357</td>
    </tr>
    <tr>
      <td>5</td>
      <td>Straw Hat</td>
      <td>1681</td>
      <td>543</td>
      <td>403</td>
      <td>700</td>
      <td>3327</td>
    </tr>
    <tr>
      <td>6</td>
      <td>Mhackeroni</td>
      <td>1118</td>
      <td>656</td>
      <td>444</td>
      <td>800</td>
      <td>3018</td>
    </tr>
    <tr>
      <td>7</td>
      <td>If this works we’ll get fewer next year</td>
      <td>1223</td>
      <td>475</td>
      <td>274</td>
      <td>1000</td>
      <td>2972</td>
    </tr>
    <tr>
      <td>8</td>
      <td>HypeBoy</td>
      <td>1272</td>
      <td>473</td>
      <td>316</td>
      <td>800</td>
      <td>2861</td>
    </tr>
    <tr>
      <td>9</td>
      <td>Cold Fusion</td>
      <td>1113</td>
      <td>433</td>
      <td>302</td>
      <td>800</td>
      <td>2648</td>
    </tr>
    <tr>
      <td>10</td>
      <td>Next Year’s Organizers</td>
      <td>988</td>
      <td>466</td>
      <td>305</td>
      <td>700</td>
      <td>2459</td>
    </tr>
    <tr>
      <td>11</td>
      <td>Friendly Maltese Citizens</td>
      <td>723</td>
      <td>437</td>
      <td>228</td>
      <td>800</td>
      <td>2188</td>
    </tr>
    <tr>
      <td>12</td>
      <td>Never Stop Exploiting</td>
      <td>313</td>
      <td>417</td>
      <td>255</td>
      <td>700</td>
      <td>1685</td>
    </tr>
  </tbody>
</table>]]></content><author><name>vito</name></author><category term="2024" /><category term="defcon-32" /><category term="final" /><category term="results" /><summary type="html"><![CDATA[Nautilus Institute ran DEF CON CTF in Las Vegas August 9-11, 2024. After three days of hardcore hacking, the Maple Mallard Magistrates once again defended their title. Congratulations to MMM, and to the other teams that qualified for and played in our finals!]]></summary></entry><entry><title type="html">Photography at Hacker Events</title><link href="https://nautilus.institute/blog/2024/photography-at-defcon/" rel="alternate" type="text/html" title="Photography at Hacker Events" /><published>2024-09-03T18:33:37+00:00</published><updated>2024-09-03T18:33:37+00:00</updated><id>https://nautilus.institute/blog/2024/photography-at-defcon</id><content type="html" xml:base="https://nautilus.institute/blog/2024/photography-at-defcon/"><![CDATA[<p>I’ve done some photography at hacker events in the last few years;
DEF CON 31 and 32, CCCamp 2023, and Toorcamp 2024.
I’ve got some policies, techniques, and tips to share.</p>

<style type="text/css">
  .post-content img {
    max-width: 100%;
    height: auto;
  }

  .post-content img.floater {
    float: right;
    margin: 0 0 1em 1em;
    max-width: 30%;
  }

  .post-content figure.up2 img {
    max-width: 49%;
    height: auto;
  }
</style>

<p>Most of the pictures here aren’t resized.
If you want a better look,
open them in a new tab.</p>

<p><img src="/images/2024-photography-at-defcon/policy.jpeg" alt="DEF CON 32 photo policy" class="floater" /></p>

<h1 id="policies">Policies</h1>

<p>DEF CON’s policy since 2023 is roughly 
that photography with consent is allowed.
Being on stage implies consent,
being in the CTF room is explicitly not consent,
and blurring out non-subjects with “portrait mode”
is encouraged.
Press and official DEF CON photo goons 
are also expected to follow these policies.</p>

<h1 id="techniques">Techniques</h1>

<h2 id="going-fast">Going Fast</h2>

<p>Fast primes are great for these kinds of events,
both because they pull in more light 
and work better in the dark,
and they give you a ton of control over what’s in focus.</p>

<figure>
<img alt="deadwood and cydonia on the aerospace village stage
with scattered and blurry crowd members in the background" src="/images/2024-photography-at-defcon/stage.jpg" />
<figcaption>
  DEF CON 31, EOS R, EF 50mm f/1.4 USM, f/1.4, 1/80, ISO 800
</figcaption>
</figure>

<p>Shooting them wide open gets you that “portrait mode;”
you also get to use a faster shutter or
lower/less-noisy ISO
in the same light.
Sometimes you get vignetting, 
weirdly-shaped bokeh balls, 
lens flare,
and other aberrations wide open.
I lean into it.</p>

<figure>
<img alt="94c3 on the computer" src="/images/2024-photography-at-defcon/94c3.jpg" />
<figcaption>
  DEF CON 32, EOS R5, EF 50mm f/1.0L USM, f/1.0, 1/60, ISO 500
</figcaption>
</figure>

<h2 id="going-slow">Going Slow</h2>

<p>In the hard opposite direction,
you might try some
long exposures.
Every time I do this, 
it takes me way too long to remember
that time-priority mode is a thing,
and it’ll automatically solve aperture and 
ISO for the duration of exposure you want.</p>

<figure class="up2">
<img alt="traces of bicycles with flashing LEDs pass crowds of people" src="/images/2024-photography-at-defcon/lomg.jpg" />
<img alt="magnets on a green van, spelling out slogans with ghosts of people slightly visible" src="/images/2024-photography-at-defcon/bus.jpg" />

  <figcaption>
    CCCamp 2023, EOS R, RF 24-105mm f/4L IS USM, f/4, 30s, ISO 50 (both)
  </figcaption>
</figure>

<p>Long exposures are pretty good at removing people, 
since we move.</p>

<figure>
<img alt="silhouettes and light art" src="/images/2024-photography-at-defcon/lightshow.jpg" />
<figcaption>
  Toorcamp 2024, EOS R5, RF 85mm f/1.2L USM DS, f/1.2, 1s, ISO 400
</figcaption>
</figure>

<p>Mixing this with a flash is fun too.</p>

<figure>
<img alt="trinitr0n, smiling, both in a full color version and a green ghostly version" src="/images/2024-photography-at-defcon/tr0n.jpg" />
<figcaption>
Toorcamp 2024, EOS R5, RF 85mm f/1.2L USM DS, f/1.8, 1s, ISO 400
</figcaption>
</figure>

<p>For Toorcamp 2024 and DEF CON 32 I brought
a couple handheld multicolor LED lights.
I used the hell out of ‘em at Toorcamp
and never turned ‘em on once at DEF CON.</p>

<figure>
<img alt="a bottle of 'FUK' Fukuoka whisky, lit by blue and pink LEDs on a table in front of it" src="/images/2024-photography-at-defcon/fuk.jpg" />
<figcaption>
Toorcamp 2024, EOS R5, RF 85mm f/1.2L USM DS, f/1.2, 1/125, ISO 400
</figcaption>
</figure>

<h2 id="getting-consent">Getting Consent</h2>

<p>I still find it awkward to ask 
“is it alright if I take a picture of you?”
I feel like I overthink the vibes of the situation,
but it means that the worst I’ve gotten is a “no.”
Sometimes (if it’s loud or busy) 
I’ll tap on the camera and make a thumbs-up thumbs-down gesture.</p>

<p>If it’s a group you’re spending lots of time with,
you can definitely have a longer conversation about what you’ll
do with the photos, and what situations are alright ahead of time.</p>

<p>Worst case,
you can always delete the photo while they watch.</p>

<h2 id="shooting-film">Shooting Film</h2>

<p>This is way more dicey and annoying than digital.
I shot a roll at DEF CON 31 and two rolls at Cccamp 2023.
There’s suddenly inventory management and 
decisions to be made about what film stock to load.</p>

<figure class="up2">
<img alt="spacey &amp; cydonia walking away in a vast and empty hallway" src="/images/2024-photography-at-defcon/empty.jpg" />
  <br />
<img alt="black and white photo, a bin of ikea blåhajar" src="/images/2024-photography-at-defcon/blahajar.jpg" />
</figure>

<p>I realized at the airport on the way to DEF CON 31
that I only brought 50mm lenses,
with the FD 50mm f/1.8 on the film camera.
It’s nice and fast, 
which paired well with the Kodak Ultramax 400 I loaded.</p>

<p>I brought a slow roll of CineStill 50D and
a super-slow roll of Lomography Babylon 13 to camp.
I had the digital for night shots, 
so these were for natural light.</p>

<h1 id="final">Final</h1>

<p>It’s hard to get the time to attend these events,
and they’re all big enough that you have to
really pick and choose how what you see and experience.
Choosing to spend that time staring through a camera
is a choice!
You can use photography as a way to meet new people,
see things a new way,
and remember things once the summer’s over.</p>]]></content><author><name>vito</name></author><category term="art" /><summary type="html"><![CDATA[I’ve done some photography at hacker events in the last few years; DEF CON 31 and 32, CCCamp 2023, and Toorcamp 2024. I’ve got some policies, techniques, and tips to share.]]></summary></entry><entry><title type="html">DEF CON 32 CTF Qualifiers Announcement</title><link href="https://nautilus.institute/blog/2024/quals-2024-date/" rel="alternate" type="text/html" title="DEF CON 32 CTF Qualifiers Announcement" /><published>2024-01-01T18:33:37+00:00</published><updated>2024-01-01T18:33:37+00:00</updated><id>https://nautilus.institute/blog/2024/quals-2024-date</id><content type="html" xml:base="https://nautilus.institute/blog/2024/quals-2024-date/"><![CDATA[<p>Nautilus Institute will be hosting qualifiers for DEF CON Capture the Flag
starting at midnight UTC at the start of May 4, 2024, 
and ending 48 hours later at
midnight UTC at the end of May 5, 2024.</p>

<p>Registration will open closer to the contest.</p>

<table>
    <thead>
      <th></th>
      <th>epoch</th>
      <th>human</th>
    </thead>
    <tbody>
    <tr class="timetable">
      <th>game start</th>
      <td class="epoch">1714780800</td>
      <td class="human">May 4, 2024 at Midnight UTC</td>
    </tr>
    <tr class="timetable">
      <th>game end</th>
      <td class="epoch">1714953600</td>
      <td class="human">May 6, 2024 at Midnight UTC</td>
    </tr>
    </tbody>
  </table>

<script src="/js/timetable.js" type="text/javascript"></script>]]></content><author><name>vito</name></author><category term="2024" /><category term="defcon-32" /><category term="qualifier" /><summary type="html"><![CDATA[Nautilus Institute will be hosting qualifiers for DEF CON Capture the Flag starting at midnight UTC at the start of May 4, 2024, and ending 48 hours later at midnight UTC at the end of May 5, 2024.]]></summary></entry><entry><title type="html">Raw Water: Quenching Your Thirst for SQL Injection</title><link href="https://nautilus.institute/blog/2023/raw-water/" rel="alternate" type="text/html" title="Raw Water: Quenching Your Thirst for SQL Injection" /><published>2023-09-20T17:33:37+00:00</published><updated>2023-09-20T17:33:37+00:00</updated><id>https://nautilus.institute/blog/2023/raw-water</id><content type="html" xml:base="https://nautilus.institute/blog/2023/raw-water/"><![CDATA[<p><em>This article was originally presented as a lightning talk
during ElixirConf 2023.</em></p>

<p>Computer security Capture The Flag contests
(CTFs for short)
are fundamentally about getting secrets out of computer programs.
Sometimes the secrets are locked inside or behind a
complex binary requiring a 
decompiler or disassembler and 
hours of analysis,
and this frustrates players who want “web” challenges.
Web challenges are often synonymous with SQL injection challenges,
which are a particular flavor of
<a href="https://cwe.mitre.org/data/definitions/94.html">CWE-94 Improper Control of Generation of Code</a>.</p>

<p>Unfortunately,
<a href="https://sqlmap.org/">sqlmap</a> 
is a really useful tool for finding and exploiting
SQL injection vulnerabilities in web applications.
It’s absurd how trivial it is.
You point it at a URL and can get the complete database back.
Ridiculous.</p>

<p>However, many technologies in the modern web 
aren’t compatible with the very
’90s view of the web sqlmap assumes.
It doesn’t puppet a browser, 
just parses HTML and makes normal HTTP requests.
This means that we can use a
JavaScript-based system speaking WebSockets
or some other weirdo HTTP subset
to handle the user interaction in
a way that sqlmap can’t interact with.</p>

<p>The other problem with SQL
(or really, any flavor of persistence) injection
challenges is that mischief is incentivized.
Even if you don’t solve the challenge,
there may be opportunities to make it more difficult
for other teams through 
resource consumption attacks or just straight up vandalism
that are hard for game organizers to track down or fix during the game.</p>

<p>Hack-A-Sat, in addition to being the first CTF in space,
also had a system of tickets and receipts
(yes I did come up with it on a train ride)
to provide traceability and unique experiences per team.
Tickets contain an RNG seed and a per-team key. 
This allows different instances of a challenge
(with no communication between them, 
good for operations!)
to provide either 
a new random experience per connection or
a consistent but random experience per team.
Nautilus Institue also uses tickets and receipts for our
quals game.</p>

<p>I came up with the “Raw Water” challenge 
right at the beginning of 2023:</p>

<blockquote>
  <p>&lt;vito&gt; with the quals service i’ve been thinking about, “raw water” (sqli using websockets so you can’t just sqlmap it), not having to worry about a shared sql instance would be nice
<br />
&lt;vito&gt; oh god i have a bad idea though
<br />
&lt;vito&gt; handle the ticket myself in the http server and have a named sqlite per slug on a shared fs</p>
</blockquote>

<p>I wanted to minimize the processing done on the client;
you can’t trust them normally,
even less when only scary hackers will use it.
(j/k ilu <code class="language-plaintext highlighter-rouge">:3</code>)
I started working with raw WebSockets in Phoenix
(using <a href="https://hexdocs.pm/phoenix/Phoenix.Socket.Transport.html"><code class="language-plaintext highlighter-rouge">Phoenix.Socket.Transport</code></a>)
and was on the verge of starting the client JS for it
when I realized I was just reimplementing
<a href="https://hexdocs.pm/phoenix_live_view/welcome.html">Phoenix LiveView</a>
(which is the well-supported and pretty good
system for
receiving events from the client,
processing them on the server,
and sending redirects and HTML changes back to the client).</p>

<p>So, I built “Hellform,”
which uses the seed from the ticket to make a consistent
form of 100 fields, about half required,
with one injectable “party” field 
and one “landmine” field that rejects any single quotes
(i.e. attempts at SQL injection).
It’s broken into 10 pages of 10 fields each,
because that let me hide the page navigation on the first page
(because it was funny, to me.)
The in-progress form just lives in the LiveView process,
and the actual submission of the form is also done over the
LiveView too, which sqlmap can’t interact with.</p>

<p><a href="https://hex.pm/packages/exqlite">exqlite</a>,
an Elixir library wrapping sqlite3,
solved the shared resource problem.
Sqlite3 databases have a pretty efficient file representation,
files are just an array of bytes,
and PostgreSQL has a column type just for those.
The “Minibase” part of Raw Water really
just implements two things: saving an order and loading an order.
Wrangling the Postgres data is done elsewhere,
with <a href="https://hex.pm/packages/ecto">Ecto</a>.</p>

<p>Saving the order is kinda complicated:</p>

<ol>
  <li>Receive either the whole byte array or a big fat
<code class="language-plaintext highlighter-rouge">NULL</code> from Postgres.</li>
  <li>Open a <code class="language-plaintext highlighter-rouge">:memory:</code> datbase with
 <code class="language-plaintext highlighter-rouge">Exqlite.Sqlite3.open/1</code></li>
  <li>Deserialize the database with
<code class="language-plaintext highlighter-rouge">Exqlite.Sqlite3.deserialize/2</code></li>
  <li>Validate the schema</li>
  <li>If any of the above failed,
reopen <code class="language-plaintext highlighter-rouge">:memory</code> and 
create the <code class="language-plaintext highlighter-rouge">flags</code> and <code class="language-plaintext highlighter-rouge">orders</code> tables.</li>
  <li>Generate and insert a flag into <code class="language-plaintext highlighter-rouge">flags</code>.</li>
  <li>Run the SQL statement to insert the order into <code class="language-plaintext highlighter-rouge">orders</code>.</li>
  <li>Delete the flag from <code class="language-plaintext highlighter-rouge">flags</code> with
the SQL statement <code class="language-plaintext highlighter-rouge">DELETE FROM flags;</code></li>
  <li>Serialize the database with
<code class="language-plaintext highlighter-rouge">Exqlite.Sqlite3.serialize/1</code></li>
</ol>

<p>Loading the order is much simpler,
deserialize and <code class="language-plaintext highlighter-rouge">SELECT</code> and just 404 if it fails.</p>

<p>Minibase (or the Minibase concept) is intended to be reused
in future challenges. 
If you’re interested in it or something like it,
have a look at <a href="https://github.com/Nautilus-Institute/quals-2023/blob/main/rawwater/lib/rawwater/minibase.ex">the source code</a>,
and hit me up for questions, 
either via email or
<a href="https://hackers.town/@vito">on Mastodon</a>.</p>]]></content><author><name>vito</name></author><category term="2023" /><category term="raw-water" /><category term="elixir" /><summary type="html"><![CDATA[This article was originally presented as a lightning talk during ElixirConf 2023.]]></summary></entry><entry><title type="html">DEF CON 31 CTF Final Results</title><link href="https://nautilus.institute/blog/2023/defcon-31-ctf-final-results/" rel="alternate" type="text/html" title="DEF CON 31 CTF Final Results" /><published>2023-08-14T17:33:37+00:00</published><updated>2023-08-14T17:33:37+00:00</updated><id>https://nautilus.institute/blog/2023/defcon-31-ctf-final-results</id><content type="html" xml:base="https://nautilus.institute/blog/2023/defcon-31-ctf-final-results/"><![CDATA[<p>This past weekend, Nautilus Institute once again ran the DEF CON CTF final event at DEF CON 31 in Las Vegas in conjunction with our friends over at <a href="https://twitter.com/livectf">LiveCTF</a>. At the end of three straight days of hacking, the Maple Mallard Magistrates were able to successfully defend their title from last year. Congratulations again to them and the other teams that qualified for and played in our finals! We hope to see all of you back again next year.</p>

<p>If you’re interested in seeing the stream from the LiveCTF mini-tournament that was hosted as a “challenge” within our game, please check out the links on the <a href="https://livectf.com/">LiveCTF website</a>.</p>

<!-- more -->

<p>The full, final classification of all the teams is below:</p>

<table>
  <thead>
    <tr>
      <th>#</th>
      <th style="text-align: left">Team</th>
      <th style="text-align: right">Atk</th>
      <th style="text-align: right">Def</th>
      <th style="text-align: right">KotH</th>
      <th style="text-align: right">Live</th>
      <th style="text-align: right">TOTAL</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>1</td>
      <td style="text-align: left">Maple Mallard Magistrates</td>
      <td style="text-align: right">6436</td>
      <td style="text-align: right">329</td>
      <td style="text-align: right">1699</td>
      <td style="text-align: right">1337</td>
      <td style="text-align: right">9801</td>
    </tr>
    <tr>
      <td>2</td>
      <td style="text-align: left">Blue Water</td>
      <td style="text-align: right">4879</td>
      <td style="text-align: right">208</td>
      <td style="text-align: right">1741</td>
      <td style="text-align: right">600</td>
      <td style="text-align: right">7428</td>
    </tr>
    <tr>
      <td>3</td>
      <td style="text-align: left">TWN48</td>
      <td style="text-align: right">5128</td>
      <td style="text-align: right">370</td>
      <td style="text-align: right">758</td>
      <td style="text-align: right">500</td>
      <td style="text-align: right">6756</td>
    </tr>
    <tr>
      <td>4</td>
      <td style="text-align: left">hypeboy</td>
      <td style="text-align: right">3545</td>
      <td style="text-align: right">163</td>
      <td style="text-align: right">1086</td>
      <td style="text-align: right">1000</td>
      <td style="text-align: right">5794</td>
    </tr>
    <tr>
      <td>5</td>
      <td style="text-align: left">StrawHat</td>
      <td style="text-align: right">3788</td>
      <td style="text-align: right">115</td>
      <td style="text-align: right">662</td>
      <td style="text-align: right">900</td>
      <td style="text-align: right">5465</td>
    </tr>
    <tr>
      <td>6</td>
      <td style="text-align: left">Norsecode</td>
      <td style="text-align: right">4411</td>
      <td style="text-align: right">108</td>
      <td style="text-align: right">196</td>
      <td style="text-align: right">700</td>
      <td style="text-align: right">5415</td>
    </tr>
    <tr>
      <td>7</td>
      <td style="text-align: left">P1G_BuT_S4D</td>
      <td style="text-align: right">3358</td>
      <td style="text-align: right">75</td>
      <td style="text-align: right">1360</td>
      <td style="text-align: right">600</td>
      <td style="text-align: right">5393</td>
    </tr>
    <tr>
      <td>8</td>
      <td style="text-align: left">SuperDiceCode</td>
      <td style="text-align: right">3992</td>
      <td style="text-align: right">143</td>
      <td style="text-align: right">680</td>
      <td style="text-align: right">500</td>
      <td style="text-align: right">5315</td>
    </tr>
    <tr>
      <td>9</td>
      <td style="text-align: left">Orgakraut</td>
      <td style="text-align: right">3839</td>
      <td style="text-align: right">165</td>
      <td style="text-align: right">249</td>
      <td style="text-align: right">500</td>
      <td style="text-align: right">4753</td>
    </tr>
    <tr>
      <td>10</td>
      <td style="text-align: left">mhackeroni</td>
      <td style="text-align: right">3382</td>
      <td style="text-align: right">236</td>
      <td style="text-align: right">144</td>
      <td style="text-align: right">800</td>
      <td style="text-align: right">4562</td>
    </tr>
    <tr>
      <td>11</td>
      <td style="text-align: left">Shellphish</td>
      <td style="text-align: right">3077</td>
      <td style="text-align: right">110</td>
      <td style="text-align: right">393</td>
      <td style="text-align: right">700</td>
      <td style="text-align: right">4280</td>
    </tr>
    <tr>
      <td>12</td>
      <td style="text-align: left">Undef1ned</td>
      <td style="text-align: right">3129</td>
      <td style="text-align: right">153</td>
      <td style="text-align: right">370</td>
      <td style="text-align: right">500</td>
      <td style="text-align: right">4152</td>
    </tr>
  </tbody>
</table>]]></content><author><name>fuzyll</name></author><category term="2023" /><category term="defcon-31" /><category term="final" /><category term="results" /><summary type="html"><![CDATA[This past weekend, Nautilus Institute once again ran the DEF CON CTF final event at DEF CON 31 in Las Vegas in conjunction with our friends over at LiveCTF. At the end of three straight days of hacking, the Maple Mallard Magistrates were able to successfully defend their title from last year. Congratulations again to them and the other teams that qualified for and played in our finals! We hope to see all of you back again next year.]]></summary></entry><entry><title type="html">DEF CON 31 CTF Qualifier Results</title><link href="https://nautilus.institute/blog/2023/defcon-31-ctf-qualifier-results/" rel="alternate" type="text/html" title="DEF CON 31 CTF Qualifier Results" /><published>2023-05-28T17:33:37+00:00</published><updated>2023-05-28T17:33:37+00:00</updated><id>https://nautilus.institute/blog/2023/defcon-31-ctf-qualifier-results</id><content type="html" xml:base="https://nautilus.institute/blog/2023/defcon-31-ctf-qualifier-results/"><![CDATA[<p>This weekend, we ran the qualifier event for this year’s DEF CON CTF. 1828 teams registered to play in our game, and we want to thank all of you for registering. We hope you all had an amazing weekend solving the challenges we created for you, even if only 535 teams actually solved something!</p>

<p>If you’re interested in all of the data from this year’s game, you can find it on <a href="https://quals.2023.nautilus.institute/">this page</a>.</p>

<!-- more -->

<p>The top 11 teams from this year’s qualifier, plus last year’s winner (Maple Mallard Magistrates), will be invited to play in the final event. This will be held later this year from August 11-13 in Las Vegas at <a href="https://defcon.org/html/defcon-31/dc-31-index.html">DEF CON 31</a>. If any teams decline our invitation, we will move further down the list to ensure we have 12 total teams.</p>

<p>This was the top 20 for this year’s event:</p>

<ol>
  <li><strong>Blue Water</strong> - 3753 points</li>
  <li><strong>The Parliament of Ducks</strong> - 3499 points</li>
  <li><strong>orgakraut</strong> - 3466 points</li>
  <li><strong>SuperDiceCode</strong> - 3398 points</li>
  <li><strong>TWN48</strong> - 3236 points</li>
  <li><strong>Straw Hat</strong> - 3204 points</li>
  <li><strong>Norsecode’23</strong> - 3090 points</li>
  <li><strong>mhackeroni</strong> - 2920 points</li>
  <li><strong>P1G BuT S4D</strong> - 2745 points</li>
  <li><strong>Shellphish</strong> - 2500 points</li>
  <li><strong>undef1ned</strong> - 2481 points</li>
  <li><strong>HypeBoy</strong> - 2417 points</li>
  <li><strong>PTB_WTL_0T</strong> - 2156 points</li>
  <li><strong>Katzebin</strong> - 2112 points</li>
  <li><strong>if this doesn’t work we’ll get more for next year</strong> - 2083 points</li>
  <li><strong>Never Stop Exploiting</strong> - 2078 points</li>
  <li><strong>untitled</strong> - 1590 points</li>
  <li><strong>Team Baguette</strong> - 1369 points</li>
  <li><strong>JMP FS:[RCX]</strong> - 1284 points</li>
  <li><strong>tasteless</strong> - 1211 points</li>
</ol>]]></content><author><name>fuzyll</name></author><category term="2023" /><category term="defcon-31" /><category term="qualifier" /><category term="results" /><summary type="html"><![CDATA[This weekend, we ran the qualifier event for this year’s DEF CON CTF. 1828 teams registered to play in our game, and we want to thank all of you for registering. We hope you all had an amazing weekend solving the challenges we created for you, even if only 535 teams actually solved something!]]></summary></entry><entry><title type="html">DEF CON 31 CTF Qualifier Registration</title><link href="https://nautilus.institute/blog/2023/defcon-31-ctf-qualifier-registration/" rel="alternate" type="text/html" title="DEF CON 31 CTF Qualifier Registration" /><published>2023-05-09T17:33:37+00:00</published><updated>2023-05-09T17:33:37+00:00</updated><id>https://nautilus.institute/blog/2023/defcon-31-ctf-qualifier-registration</id><content type="html" xml:base="https://nautilus.institute/blog/2023/defcon-31-ctf-qualifier-registration/"><![CDATA[<p>Registration for the DEF CON 31 CTF Qualifier is <a href="https://quals.2023.nautilus.institute">now open</a>!</p>

<p>For this year’s final event, we are limiting the number of qualified teams to <strong>12</strong>. As is tradition, our <a href="/2022/defcon-30/final/results/2022/08/14/defcon-30-ctf-final-results/">winner from last year</a>, MMM, will be automatically qualified which leaves 11 spots up for grabs. We’ll see you all starting at 0 UTC on May 27!</p>

<!-- more -->

<blockquote class="twitter-tweet"><p lang="en" dir="ltr">DEF CON CTF Pre-qualification registration is live!<a href="https://t.co/BTAjMwDCOv">https://t.co/BTAjMwDCOv</a><br /><br />Come try to qualify for DEF CON CTF starting Friday, May 26th!</p>&mdash; Nautilus Institute (@Nautilus_CTF) <a href="https://twitter.com/Nautilus_CTF/status/1656113014712459264?ref_src=twsrc%5Etfw">May 10, 2023</a></blockquote>
<script async="" src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>]]></content><author><name>fuzyll</name></author><category term="2023" /><category term="defcon-31" /><category term="qualifier" /><summary type="html"><![CDATA[Registration for the DEF CON 31 CTF Qualifier is now open!]]></summary></entry><entry><title type="html">DEF CON 30 CTF Final Results</title><link href="https://nautilus.institute/blog/2022/defcon-30-ctf-final-results/" rel="alternate" type="text/html" title="DEF CON 30 CTF Final Results" /><published>2022-08-14T17:33:37+00:00</published><updated>2022-08-14T17:33:37+00:00</updated><id>https://nautilus.institute/blog/2022/defcon-30-ctf-final-results</id><content type="html" xml:base="https://nautilus.institute/blog/2022/defcon-30-ctf-final-results/"><![CDATA[<p>This past weekend, Nautilus Institute ran the DEF CON CTF final event at DEF CON 30 in Las Vegas in conjunction with our friends over at <a href="https://twitter.com/livectf">LiveCTF</a>. At the end of three straight days of hacking, we crowned a winner: the Maple Mallard Magistrates. Congratulations to them and the other teams that qualified for and played in our finals! We hope to see all of you back again next year.</p>

<p>If you’re interested in seeing the stream from the mini-tournament that was hosted as a “challenge” within our game, please check out the links on the <a href="https://livectf.com/">LiveCTF website</a>.</p>

<!-- more -->

<p>The full, final classification of all the teams is below:</p>

<ol>
  <li><strong>Maple Mallard Magistrates</strong> - 24394 points</li>
  <li><strong>Katzebin</strong> - 22818 points</li>
  <li><strong>StarBugs</strong> - 22363 points</li>
  <li><strong>Water Paddler</strong> - 21788 points</li>
  <li><strong>perfect r✪✪✪t</strong> - 21654 points</li>
  <li><strong>the new organizers</strong> - 20496 points</li>
  <li><strong>Straw Hat</strong> - 20087 points</li>
  <li><strong>PTB_WTL</strong> - 18575 points</li>
  <li><strong>Balsn.217@TSJ.tw</strong> - 18550 points</li>
  <li><strong>DiceGuesser</strong> - 18229 points</li>
  <li><strong>./V /home/r/.bin/tw</strong> - 18191 points</li>
  <li><strong>CP-r3kapig</strong> - 17974 points</li>
  <li><strong>Shellphish</strong> - 17782 points</li>
  <li><strong>Sauercloud</strong> - 17348 points</li>
  <li><strong>侍</strong> - 16462 points</li>
  <li><strong>OSUSEC</strong> - 15648 points</li>
</ol>

<p><strong>Update (2022-09-26):</strong> All source code to the challenges from the game have been placed <a href="https://github.com/Nautilus-Institute/finals-2022">on GitHub</a>!</p>]]></content><author><name>fuzyll</name></author><category term="2022" /><category term="defcon-30" /><category term="final" /><category term="results" /><summary type="html"><![CDATA[This past weekend, Nautilus Institute ran the DEF CON CTF final event at DEF CON 30 in Las Vegas in conjunction with our friends over at LiveCTF. At the end of three straight days of hacking, we crowned a winner: the Maple Mallard Magistrates. Congratulations to them and the other teams that qualified for and played in our finals! We hope to see all of you back again next year.]]></summary></entry></feed>