How to safely add the Kali repository to Mobian
#1
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
  Reply
#2
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.
  Reply
#3
wget: missing URL
Warning apt-key is deprecated. Manage keyring files in trusted.gpg.d instead.

Running the Mobian project
  Reply
#4
(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!
  Reply
#5
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.
  Reply
#6
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.
  Reply
#7
(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.
  Reply
#8
(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.
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Upgrade to Mobian (Trixie) Staging biketool 7 183 Yesterday, 12:40 PM
Last Post: biketool
  bookworm vs trixie discussion for mobian in pinephone regular. zetabeta 41 8,437 11-27-2024, 10:39 AM
Last Post: fernando_c_m
  atinout binaries for mobian/debian? NeutralGrey 4 1,339 10-31-2024, 04:16 AM
Last Post: astylethargic
  Mobian-Kicksecure? 3460p 0 827 05-26-2024, 02:09 PM
Last Post: 3460p
  Mobian repository status henrythemouse 16 12,104 04-10-2024, 10:02 AM
Last Post: diederik
  cant verify mobian image at website gnugpg penguins_rule 0 885 03-18-2024, 08:54 PM
Last Post: penguins_rule
  unofficial kali linux for pinephone help needed pinesmell 5 5,034 01-08-2024, 02:50 PM
Last Post: ERPlegend
  mobian installed to eMMC - how to install tow-boot grump_fiddle_reinstall 6 3,929 11-22-2023, 11:46 AM
Last Post: aLoop100o
  What actions needed to keep on mobian testing user641 3 2,585 09-05-2023, 06:44 AM
Last Post: Zebulon Walton
  Mobian boot failed with zstd message after upgrade. Mahgue 0 970 09-01-2023, 11:29 AM
Last Post: Mahgue

Forum Jump:


Users browsing this thread: 2 Guest(s)