<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Shellcode on System Overlord</title><link>https://systemoverlord.com/tags/shellcode.html</link><description>Recent content in Shellcode on System Overlord</description><generator>Hugo</generator><language>en-us</language><managingEditor>david@systemoverlord.com (David Tomaschik)</managingEditor><webMaster>david@systemoverlord.com (David Tomaschik)</webMaster><lastBuildDate>Tue, 30 Oct 2018 00:00:00 +0000</lastBuildDate><atom:link href="https://systemoverlord.com/tags/shellcode/index.xml" rel="self" type="application/rss+xml"/><item><title>Understanding Shellcode: The Reverse Shell</title><link>https://systemoverlord.com/2018/10/30/understanding-shellcode-the-reverse-shell.html</link><pubDate>Tue, 30 Oct 2018 00:00:00 +0000</pubDate><author>david@systemoverlord.com (David Tomaschik)</author><guid>https://systemoverlord.com/2018/10/30/understanding-shellcode-the-reverse-shell.html</guid><description>&lt;p&gt;A recent conversation with a coworker inspired me to start putting
together a series of blog posts to examine what it is that shellcode does. In
the first installment, I&amp;rsquo;ll dissect the basic reverse shell.&lt;/p&gt;
&lt;p&gt;First, a couple of reminders: shellcode is the machine code that is injected
into the flow of a program as the result of an exploit. It generally must be
position independent as you can&amp;rsquo;t usually control where it will be loaded in
memory. A reverse shell initiates a TCP connection from the compromised host
back to a host under the control of the attacker. It then launches a shell with
which the attacker can interact.&lt;/p&gt;</description></item><item><title>Even shorter x86-64 shellcode</title><link>https://systemoverlord.com/2016/04/27/even-shorter-shellcode.html</link><pubDate>Wed, 27 Apr 2016 00:00:00 +0000</pubDate><author>david@systemoverlord.com (David Tomaschik)</author><guid>https://systemoverlord.com/2016/04/27/even-shorter-shellcode.html</guid><description>&lt;p&gt;So about two years ago, I put together the &lt;a href="https://systemoverlord.com/2014/06/05/minimal-x86-64-shellcode-for-binsh/"&gt;shortest x86-64 shellcode for
&lt;code&gt;execve(&amp;quot;/bin/sh&amp;quot;,...);&lt;/code&gt;&lt;/a&gt; that I could. At the time, it was 25 bytes, which I
thought was pretty damn good. However, I&amp;rsquo;m a perfectionist and so I spent some
time before work this morning playing shellcode golf. The rules of my shellcode
golf are pretty simple:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The shellcode must produce the desired effect.&lt;/li&gt;
&lt;li&gt;It doesn&amp;rsquo;t have to do things cleanly (i.e., segfaulting after is OK, as is
using APIs in unusual ways, so long as it works)&lt;/li&gt;
&lt;li&gt;It can assume the stack pointer is at a place where it will not segfault and
it will not overwrite the shellcode itself.&lt;/li&gt;
&lt;li&gt;No NULLs. While there might be other constraints, this one is too common to
not have as a default.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So, spending a little bit of time on this, I came up with the following 22 byte
shellcode:&lt;/p&gt;</description></item></channel></rss>