<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title>Archive on PrivSec - A practical approach to Privacy and Security</title>
  <link rel="alternate" href="https://deploy-preview-444--privsec-dev.netlify.app/posts/archive/" />
  <link rel="self" href="https://deploy-preview-444--privsec-dev.netlify.app/posts/archive/index.xml" />
  <subtitle>Recent content in Archive on PrivSec - A practical approach to Privacy and Security</subtitle>
  <id>https://deploy-preview-444--privsec-dev.netlify.app/posts/archive/</id>
  <generator uri="http://gohugo.io" version="0.119.0">Hugo</generator>
  <language>en</language>
  <updated>0001-01-01T00:00:00Z</updated>
  <author>
    <name>PrivSec.dev Team</name>
    
  </author>
  <rights>[CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/)</rights>
      <entry>
        <title>Installing Kali NetHunter Lite on DivestOS 20.0</title>
        <link rel="alternate" href="https://deploy-preview-444--privsec-dev.netlify.app/posts/archive/installing-kali-nethunter-lite-on-divestos-20.0/" />
        <id>https://deploy-preview-444--privsec-dev.netlify.app/posts/archive/installing-kali-nethunter-lite-on-divestos-20.0/</id>
        <published>2023-03-07T00:00:00Z</published>
        <updated>2025-02-02T08:16:32-07:00</updated>
        <summary type="html">Update: DivestOS has been discontinued and downloads are no longer available.
This will turn your device into a purely penetration testing device, and it will be very insecure for any other purpose. Please do not do this on your daily driver.
This procedure should work without modification on many devices using the standard Android bootloader (not Samsung). However, every device has unique quirks that may require special attention.
Originally, I just needed a device to run packet capture on my other devices.</summary>
          <content type="html"><![CDATA[<p><strong>Update</strong>: DivestOS has been discontinued and downloads are no longer available.</p>
<p><strong>This will turn your device into a purely penetration testing device, and it will be very insecure for any other purpose. Please do not do this on your daily driver.</strong></p>
<p><em>This procedure should work without modification on many devices using the standard Android bootloader (not Samsung). However, every device has unique quirks that may require special attention.</em></p>
<p><img loading="lazy" src="kali-nethunter-op7t.jpg" alt="Kali NetHunter Lite on a OnePlus 7T"  />
</p>
<p>Originally, I just needed a device to run packet capture on my other devices. I have a OnePlus 7T laying around which I am not using for anything (since it has already reached its end-of-life), so I thought it would be cool to give it a new purpose. I am using DivestOS here since it is my go‑to Android distribution, but you can use LineageOS or any other distribution if you want to.</p>
<p>Officially, Kali Nethunter only supports OxygenOS based on Android 10 or 11 on my device. However, since there is no security to be had anyways, I decided to have some fun and not do things by the book (their official documentation isn&rsquo;t accurate anyways, as I will explain).</p>
<h2 id="installing-divestos">Installing DivestOS</h2>
<p>The installation procedure for DivestOS is fairly straightforward. First <a href="https://divestos.org/pages/devices">download the recovery</a> and boot it using fastboot:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">fastboot reboot /path/to/the/divestos/recovery.img
</span></span><span class="line"><span class="cl">fastboot reboot recovery
</span></span></code></pre></div><p><img loading="lazy" src="divestos-recovery.jpg" alt="DivestOS Recovery"  />
</p>
<p>Select Apply Update and Apply Update from ADB:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">adb sideload /path/to/the/divestos.zip
</span></span></code></pre></div><p>Do not attempt to relock the bootloader &mdash; we need to leave it unlocked to enable privileged access (&ldquo;rooting&rdquo;) anyways. Do not reboot into the OS at this stage either.</p>
<h2 id="installing-magisk-and-disabling-forceencrypt">Installing Magisk and disabling forceencrypt</h2>
<p>The official documentation recommends <a href="https://twrp.me/">TWRP</a> and <a href="https://forum.xda-developers.com/t/deprecated-universal-dm-verity-forceencrypt-disk-quota-disabler-11-2-2020.3817389/">Disable_Dm‑Verity_ForceEncrypt</a>. However, TWRP doesn&rsquo;t exist for Android 12 and above for my device, and Disable_Dm‑Verity_ForceEncrypt is deprecated and doesn&rsquo;t even work on Android 11.</p>
<p>Instead, we will use the <a href="https://download.lineageos.org/devices/">LineageOS recovery</a> (which allows flashing files with arbitrary signatures) and <a href="https://forum.xda-developers.com/t/a-b-a-only-script-read-only-erofs-android-10-universal-disable-force-encryption-for-ro-and-rw-neo-stable.4454017/">Disable Force Encryption NEO</a>.</p>
<p>First, reboot the device into the bootloader.</p>
<p>Then, you need to download the LineageOS Recovery for your device and boot into it:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">fastboot reboot /path/to/the/lineageos/recovery.img
</span></span></code></pre></div><p>Next, you just need to do ADB sideload for Disable Force Encryption NEO. It will give you the option to install Magisk and disable forceencrypt, and choose yes on both. The rest of the options are up to you - they are not very important.</p>
<h2 id="installing-kali-nethunter-lite">Installing Kali Nethunter Lite</h2>
<p>Reboot into your OS and set it up normally. Make sure that encryption is disabled:</p>
<p><img loading="lazy" src="kali-nethunter-encryption.jpg" alt="Kali Nethunter Encryption"  />
</p>
<p>Finally, <a href="https://www.kali.org/get-kali/#kali-mobile">download</a> the appropriate build for Nethunter and flash it as a Magisk module in the Magisk Manager.</p>
<p>Happy NetHunting!</p>
]]></content>
      </entry>
      <entry>
        <title>Android VPN Leakage with Secondary User Profiles</title>
        <link rel="alternate" href="https://deploy-preview-444--privsec-dev.netlify.app/posts/archive/android-vpn-leakage-with-secondary-user-profiles/" />
        <id>https://deploy-preview-444--privsec-dev.netlify.app/posts/archive/android-vpn-leakage-with-secondary-user-profiles/</id>
        <published>2022-10-10T00:00:00Z</published>
        <updated>2023-02-25T15:05:35-05:00</updated>
        <summary type="html">Update: This is no longer reproducible on Android 13 QPR1 and Android 14 Developer Preview 1.
Before We Start&amp;hellip;
I have been aware of this issue for awhile now (since at least Android 11), though I have not done enough testing to see what actually causes the leak nor do I have any workaround at the moment. My guess is that applications which launch early when you log into a secondary profile can bypass the VPN killswitch.</summary>
          <content type="html"><![CDATA[<p><strong>Update</strong>: This is no longer reproducible on Android 13 QPR1 and Android 14 Developer Preview 1.</p>
<p><strong>Before We Start</strong>&hellip;</p>
<p>I have been aware of this issue for awhile now (since at least Android 11), though I have not done enough testing to see what actually causes the leak nor do I have any workaround at the moment. My guess is that applications which launch early when you log into a secondary profile can bypass the VPN killswitch.</p>
<p>I have reported it on <a href="https://issuetracker.google.com/issues/252851265">Google&rsquo;s issue tracker</a>.</p>
<h2 id="the-leak">The Leak</h2>
<p>You can reproduce the leak by doing the following:</p>
<ol>
<li>Create a new user profile (you need to create a secondary user profile for this, as it is not reproducible on your owner profile or a work profile). Do not log into your Google account at this stage.</li>
<li>Sideload a VPN app. The leak happens with every VPN provider I have tried (since it is likely a platform issue), though if you do not have a VPN subscription I would recommend getting a free one with <a href="https://protonvpn.com">ProtonVPN</a>.</li>
<li>Setup the VPN and the <a href="/posts/os/android-tips/#enable-vpn-killswitch">Android VPN killswitch</a>.</li>
<li>Log into your Google account through Play Services.</li>
<li>Restart the phone. Open the secondary user profile again.</li>
<li>Go to Google&rsquo;s <a href="https://myaccount.google.com/device-activity">My Devices</a> page. Observe that one of the sessions for your phone has your actual location obtained with GeoIP. In some cases, your actual IP address will be shown there as well.</li>
</ol>
<h2 id="notes">Notes</h2>
<ol>
<li>
<p>It is unlikely that this is caused by Play Services being privileged applications. This issue is reproducible on GrapheneOS with the Sandboxed Play Services (which runs as a normal, unprivileged application) as well.</p>
</li>
<li>
<p>More testing is needed to find the root cause of the problem. I do not think that this is Play Services specific. Unfortunately, I do not have access to a router to do a packet capture right now. I would appreciate it if someone can help me get to the bottom of this. You can find my contact information <a href="https://tommytran.io/contact/">here</a>.</p>
</li>
</ol>
]]></content>
      </entry>

</feed>


