PINE64
How to safely add the Kali repository to Mobian - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: PinePhone (https://forum.pine64.org/forumdisplay.php?fid=120)
+--- Forum: PinePhone Software (https://forum.pine64.org/forumdisplay.php?fid=121)
+---- Forum: Mobian on PinePhone (https://forum.pine64.org/forumdisplay.php?fid=139)
+---- Thread: How to safely add the Kali repository to Mobian (/showthread.php?tid=10649)



How to safely add the Kali repository to Mobian - User 18618 - 07-13-2020

Exercise caution when employing this change; adding the Kali repository to Debian is not endorsed by Offensive Security, the Debian Project, or the Mobian project

Code:
echo 'deb http://http.kali.org/kali kali-rolling main non-free contrib' | sudo tee /etc/apt/sources.list.d/kali.list

wget -O - https://archive.kali.org/archive-key.asc | sudo apt-key add

echo -e '# Never prefer packages from the Kali repository\nPackage: *\nPin: release o=Kali\nPin-Priority: 1' | sudo tee /etc/apt/preferences.d/99kali

Kali packages are now accessible, and do not conflict with packages provided by Debian (or Mobian)

If a Kali package is preferable to its Debian equivalent, the package should be pinned


RE: How to safely add the Kali repository to Mobian - User 18618 - 07-20-2020

Inspired by this post about hijacking Mobian to run Bedrock Linux, here's how to add a Kali Linux stratum to Bedrock Linux.

While I hope apt pinning does not create a FrankenDebian, this method ensures distinction between Debian and Kali Linux.

Code:
wget https://github.com/bedrocklinux/bedrocklinux-userland/releases/download/0.7.17/bedrock-linux-0.7.17-aarch64.sh

sudo sh ./bedrock-linux-0.7.17-aarch64.sh --hijack

sudo reboot

A new Debian stratum has been bootstrapped and named Kali; the repositories will be changed to transform this stratum to Kali Linux.

Code:
sudo brl fetch -n kali debian

sudo strat kali apt install --no-install-recommends wget gnupg

strat kali wget -O - https://archive.kali.org/archive-key.asc | sudo strat kali apt-key add

printf '%s' 'deb http://http.kali.org/kali kali-rolling main non-free contrib' | sudo strat kali tee /etc/apt/sources.list

sudo strat kali apt update && sudo strat kali apt full-upgrade && sudo strat kali apt autoremove

Now Kali packages can be installed. To prefer (pin) stratum binaries, see /bedrock/etc/bedrock.conf.


ERR - Brother - 02-17-2021

wget: missing URL
Warning apt-key is deprecated. Manage keyring files in trusted.gpg.d instead.

Running the Mobian project


RE: ERR - User 18618 - 02-27-2021

(02-17-2021, 05:41 AM)Brother Wrote: wget: missing URL
Warning apt-key is deprecated. Manage keyring files in trusted.gpg.d instead.

Running the Mobian project

Check Kali upstream. I'm not using the PinePhone regularly anymore, and this post was just for fun. Cheers!


RE: How to safely add the Kali repository to Mobian - User 18618 - 08-10-2021

An addendum, apt-key should not be used as seen in the original post:


Quote:The key MUST be downloaded over a secure mechanism like HTTPS to a location only writable by root, which SHOULD be /usr/share/keyrings.

The key MUST NOT be placed in /etc/apt/trusted.gpg.d or loaded by apt-key add.



RE: How to safely add the Kali repository to Mobian - swiley - 08-10-2021

IME: your usually better off building these packages from the upstream source. I went through an entire "cyber security class" in college doing that on Alpine.


RE: How to safely add the Kali repository to Mobian - User 18618 - 08-15-2021

(08-10-2021, 06:08 AM)swiley Wrote: IME: your usually better off building these packages from the upstream source. I went through an entire "cyber security class" in college doing that on Alpine.

With cross-compilation, maybe... I don't like the idea of compiling on bare metal in this case Big Grin

To re-iterate, this post is outdated and was just for fun. I don't recommend using it as anything other than a novelty.


RE: How to safely add the Kali repository to Mobian - swiley - 08-16-2021

(08-15-2021, 02:52 AM)jed Wrote: I don't like the idea of compiling on bare metal in this case Big Grin

Why not? Half the reason I bought the phone was so I could compile stuff on it without hassle. I haven't had issues doing this.