Merge branch 'misc' into 'master'

Consistencies between installer and live images

See merge request kalilinux/build-scripts/live-build-config!12
merge-requests/16/head
g0t mi1k 4 years ago
commit 15d9b060bc

@ -1,13 +1,18 @@
# Supported options are:
# Supported options are (from build.sh):
# -d | --distribution <distro>
# -p | --proposed-updates
# -a | --arch <architecture>
# --subdir <directory-name>
# --version <version>
# --variant <variant>
# --installer
# --no-clean
# -v | --verbose
# -D | --debug
# -s | --salt
BUILD_OPTS_SHORT="d:pa:vs"
BUILD_OPTS_LONG="distribution:,proposed-updates,arch:,subdir:,version:,variant:,verbose,salt,installer,no-clean"
# --installer
# --live
# --variant <variant>
# --version <version>
# --subdir <directory-name>
# --get-image-path
# --no-clean
# --clean
BUILD_OPTS_SHORT="d:pa:vDs"
BUILD_OPTS_LONG="distribution:,proposed-updates,arch:,verbose,debug,salt,installer,live,variant:,version:,subdir:,get-image-path,no-clean,clean"

37
.gitignore vendored

@ -1,19 +1,32 @@
binary.*
prepare.log
binary
images
cache
chroot
# Directories
.build/*
binary/*
binary.*/*
cache/*
chroot/*
config/*
images/*
local/*
simple-cdd/images/*
simple-cdd/tmp/*
# Files
.mirror
build.log
chroot.files
chroot.packages.install
chroot.packages.live
.mirror
.stage
.lock
.build/
config/binary
config/bootstrap
config/common
config/source
simple-cdd/debian-cd
live-image-*.contents
live-image-*.files
live-image-*.hybrid.iso.zsync
live-image-*.packages
# Overwritten due to build.sh
simple-cdd/debian-cd/*
simple-cdd/profiles/kali.downloads
simple-cdd/tmp
# Miscellaneous
.lock
.stage
prepare.log

@ -1,7 +1,15 @@
#!/bin/sh
lb clean noauto "$@"
rm -f config/binary config/bootstrap \
config/chroot config/common config/source \
config/package-lists/live.list.chroot
find config/hooks/ -type l | xargs --no-run-if-empty rm -f
rm -f config/binary \
config/bootstrap \
config/chroot \
config/common \
config/source \
config/package-lists/live.list.chroot
if [ -e config/hooks/ ]; then
find config/hooks/ -type l \
| xargs --no-run-if-empty rm -f
fi

@ -1,74 +0,0 @@
#!/bin/sh
# The reference version of this script is maintained in
# live-build-config/bin/kali-finish-install.
#
# It is used in multiple places to finish configuring the target system
# and build.sh copies it where required (in the simple-cdd configuration
# and in the live-build configuration).
configure_sources_list() {
if grep -q '^deb ' /etc/apt/sources.list; then
echo "INFO: sources.list is configured, everything is fine"
return
fi
echo "INFO: sources.list is empty, setting up a default one for Kali"
cat >/etc/apt/sources.list <<END
# See https://www.kali.org/docs/general-use/kali-linux-sources-list-repositories/
deb http://http.kali.org/kali kali-rolling main contrib non-free
# Additional line for source packages
# deb-src http://http.kali.org/kali kali-rolling main contrib non-free
END
apt-get update
}
get_user_list() {
for user in $(cd /home && ls); do
if ! getent passwd "$user" >/dev/null; then
echo "WARNING: user '$user' is invalid but /home/$user exists"
continue
fi
echo "$user"
done
echo "root"
}
configure_zsh() {
if grep -q 'nozsh' /proc/cmdline; then
echo "INFO: user opted out of zsh by default"
return
fi
if [ ! -x /usr/bin/zsh ]; then
echo "INFO: /usr/bin/zsh is not available"
return
fi
for user in $(get_user_list); do
echo "INFO: changing default shell of user '$user' to zsh"
chsh --shell /usr/bin/zsh $user
done
}
# This is generically named in case we want to add other groups in the future.
configure_usergroups() {
# Create the kaboxer group if needed
addgroup --system kaboxer || true
# Create the wireshark group if needed
addgroup --system wireshark || true
# kaboxer - for kaboxer
# dialout - for serial access
# wireshark - capture sessions in wireshark
kali_groups="kaboxer,dialout,wireshark"
for user in $(get_user_list); do
echo "INFO: adding user '$user' to groups '$kali_groups'"
usermod -a -G "$kali_groups" $user || true
done
}
configure_sources_list
configure_zsh
configure_usergroups

@ -1,8 +1,11 @@
#!/bin/bash
# If a command fails, make the whole script exit
set -e
set -o pipefail # Bashism
# Use return code for any command errors in part of a pipe
set -o pipefail # Bashism
# Kali's default values
KALI_DIST="kali-rolling"
KALI_VERSION=""
KALI_VARIANT="default"
@ -11,6 +14,7 @@ TARGET_DIR="$(dirname $0)/images"
TARGET_SUBDIR=""
SUDO="sudo"
VERBOSE=""
DEBUG=""
HOST_ARCH=$(dpkg --print-architecture)
image_name() {
@ -24,7 +28,6 @@ image_name() {
esac
}
live_image_name() {
case "$KALI_ARCH" in
i386|amd64|arm64)
@ -74,22 +77,24 @@ target_build_log() {
default_version() {
case "$1" in
kali-*)
echo "${1#kali-}"
kali-*)
echo "${1#kali-}"
;;
*)
echo "$1"
*)
echo "$1"
;;
esac
}
failure() {
echo "Build of $KALI_DIST/$KALI_VARIANT/$KALI_ARCH $IMAGE_TYPE image failed (see build.log for details)" >&2
echo "Log: $BUILD_LOG" >&2
exit 2
}
run_and_log() {
if [ -n "$VERBOSE" ]; then
if [ -n "$VERBOSE" ] || [ -n "$DEBUG" ]; then
echo "RUNNING: $@" >&2
"$@" 2>&1 | tee -a $BUILD_LOG
else
"$@" >>$BUILD_LOG 2>&1
@ -97,9 +102,32 @@ run_and_log() {
return $?
}
debug() {
if [ -n "$DEBUG" ]; then
echo "DEBUG: $*" >&2
fi
}
clean() {
debug "Cleaning"
# Live
run_and_log $SUDO lb clean --purge
# Installer
run_and_log $SUDO rm -rf simple-cdd/tmp
run_and_log $SUDO rm -rf simple-cdd/debian-cd
}
# Allowed command line options
. $(dirname $0)/.getopt.sh
# Parsing command line options
BUILD_LOG=$(pwd)/build.log
debug "BUILD_LOG: $BUILD_LOG"
# Create empty file
: > $BUILD_LOG
# Parsing command line options (see .getopt.sh)
temp=$(getopt -o "$BUILD_OPTS_SHORT" -l "$BUILD_OPTS_LONG,get-image-path" -- "$@")
eval set -- "$temp"
while true; do
@ -108,25 +136,37 @@ while true; do
-p|--proposed-updates) OPT_pu="1"; shift 1; ;;
-a|--arch) KALI_ARCH="$2"; shift 2; ;;
-v|--verbose) VERBOSE="1"; shift 1; ;;
-D|--debug) DEBUG="1"; shift 1; ;;
-s|--salt) shift; ;;
--installer) IMAGE_TYPE="installer"; shift 1 ;;
--live) IMAGE_TYPE="live"; shift 1 ;;
--variant) KALI_VARIANT="$2"; shift 2; ;;
--version) KALI_VERSION="$2"; shift 2; ;;
--subdir) TARGET_SUBDIR="$2"; shift 2; ;;
--get-image-path) ACTION="get-image-path"; shift 1; ;;
--clean) ACTION="clean"; shift 1; ;;
--no-clean) NO_CLEAN="1"; shift 1 ;;
--) shift; break; ;;
*) echo "ERROR: Invalid command-line option: $1" >&2; exit 1; ;;
esac
esac
done
# Set default values
KALI_ARCH=${KALI_ARCH:-$HOST_ARCH}
if [ "$KALI_ARCH" == "x64" ]; then
KALI_ARCH="amd64"
elif [ "$KALI_ARCH" == "x86" ]; then
KALI_ARCH="i386"
fi
debug "KALI_ARCH: $KALI_ARCH"
if [ -z "$KALI_VERSION" ]; then
KALI_VERSION="$(default_version $KALI_DIST)"
fi
debug "KALI_VERSION: $KALI_VERSION"
# Check parameters
debug "HOST_ARCH: $HOST_ARCH"
if [ "$HOST_ARCH" != "$KALI_ARCH" ] && [ "$IMAGE_TYPE" != "installer" ]; then
case "$HOST_ARCH/$KALI_ARCH" in
amd64/i386|i386/amd64)
@ -140,15 +180,26 @@ fi
# Build parameters for lb config
KALI_CONFIG_OPTS="--distribution $KALI_DIST -- --variant $KALI_VARIANT"
CODENAME=$KALI_DIST # for simple-cdd/debian-cd
CODENAME=$KALI_DIST # for simple-cdd/debian-cd
if [ -n "$OPT_pu" ]; then
KALI_CONFIG_OPTS="$KALI_CONFIG_OPTS --proposed-updates"
KALI_DIST="$KALI_DIST+pu"
fi
debug "KALI_CONFIG_OPTS: $KALI_CONFIG_OPTS"
debug "CODENAME: $CODENAME"
debug "KALI_DIST: $KALI_DIST"
# Set sane PATH (cron seems to lack /sbin/ dirs)
export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
debug "PATH: $PATH"
if [ -e /etc/debian_version ]; then
debug "OS: $( cat /etc/debian_version )"
else
echo "ERROR: Non Debin-based OS" >&2
fi
debug "IMAGE_TYPE: $IMAGE_TYPE"
case "$IMAGE_TYPE" in
live)
if [ ! -d "$(dirname $0)/kali-config/variant-$KALI_VARIANT" ]; then
@ -160,11 +211,14 @@ case "$IMAGE_TYPE" in
echo "ERROR: You need live-build (>= 1:20151215kali1), you have $ver_live_build" >&2
exit 1
fi
debug "ver_live_build: $ver_live_build"
ver_debootstrap=$(dpkg-query -f '${Version}' -W debootstrap)
if dpkg --compare-versions "$ver_debootstrap" lt "1.0.97"; then
echo "ERROR: You need debootstrap (>= 1.0.97), you have $ver_debootstrap" >&2
exit 1
fi
debug "ver_debootstrap: $ver_debootstrap"
;;
installer)
if [ ! -d "$(dirname $0)/kali-config/installer-$KALI_VARIANT" ]; then
@ -176,11 +230,18 @@ case "$IMAGE_TYPE" in
echo "ERROR: You need debian-cd (>= 3.1.28~kali1), you have $ver_debian_cd" >&2
exit 1
fi
debug "ver_debian_cd: $ver_debian_cd"
ver_simple_cdd=$(dpkg-query -f '${Version}' -W simple-cdd)
if dpkg --compare-versions "$ver_simple_cdd" lt 0.6.8~kali1; then
echo "ERROR: You need simple-cdd (>= 0.6.8~kali1), you have $ver_simple_cdd" >&2
exit 1
fi
debug "ver_simple_cdd: $ver_simple_cdd"
;;
*)
echo "ERROR: Unsupported IMAGE_TYPE selected ($IMAGE_TYPE)" >&2
exit 1
;;
esac
@ -193,100 +254,120 @@ if [ "$(whoami)" != "root" ]; then
else
SUDO="" # We're already root
fi
debug "SUDO: $SUDO"
IMAGE_NAME="$(image_name $KALI_ARCH)"
debug "IMAGE_NAME: $IMAGE_NAME"
debug "ACTION: $ACTION"
if [ "$ACTION" = "get-image-path" ]; then
echo $(target_image_name $KALI_ARCH)
exit 0
fi
if [ "$NO_CLEAN" = "" ]; then
clean
fi
if [ "$ACTION" = "clean" ]; then
exit 0
fi
cd $(dirname $0)
mkdir -p $TARGET_DIR/$TARGET_SUBDIR
IMAGE_NAME="$(image_name $KALI_ARCH)"
# Don't quit on any errors now
set +e
BUILD_LOG=$(pwd)/build.log
: > $BUILD_LOG
case "$IMAGE_TYPE" in
live)
if [ "$NO_CLEAN" = "" ]; then
run_and_log $SUDO lb clean --purge
fi
cp bin/kali-finish-install kali-config/common/includes.installer/
[ $? -eq 0 ] || failure
debug "Stage 1/2 - Config"
run_and_log lb config -a $KALI_ARCH $KALI_CONFIG_OPTS "$@"
[ $? -eq 0 ] || failure
debug "Stage 2/2 - Build"
run_and_log $SUDO lb build
if [ $? -ne 0 ] || [ ! -e $IMAGE_NAME ]; then
failure
fi
;;
installer)
if [ "$NO_CLEAN" = "" ]; then
run_and_log $SUDO rm -rf simple-cdd/tmp
run_and_log $SUDO rm -rf simple-cdd/debian-cd
fi
# Setup custom debian-cd to make our changes
cp -aT /usr/share/debian-cd simple-cdd/debian-cd
# Keep 686-pae udebs as we changed the default from 686
# to 686-pae in the debian-installer images
sed -i -e '/686-pae/d' \
simple-cdd/debian-cd/data/$CODENAME/exclude-udebs-i386
# Override some debian-cd environment variables
export BASEDIR=$(pwd)/simple-cdd/debian-cd
export ARCHES=$KALI_ARCH
export ARCH=$KALI_ARCH
export DEBVERSION=$KALI_VERSION
debug "BASEDIR: $BASEDIR"
debug "ARCHES: $ARCHES"
debug "ARCH: $ARCH"
debug "DEBVERSION: $DEBVERSION"
if [ "$KALI_VARIANT" = "netinst" ]; then
export DISKTYPE="NETINST"
export DISKTYPE="NETINST"
else
export DISKTYPE="DVD"
export DISKTYPE="DVD"
fi
debug "DISKTYPE: $DISKTYPE"
if [ -e .mirror ]; then
kali_mirror=$(cat .mirror)
kali_mirror=$(cat .mirror)
else
kali_mirror=http://archive.kali.org/kali/
kali_mirror=http://archive.kali.org/kali/
fi
if ! echo "$kali_mirror" | grep -q '/$'; then
kali_mirror="$kali_mirror/"
kali_mirror="$kali_mirror/"
fi
debug "kali_mirror: $kali_mirror"
debug "Stage 1/2 - File(s)"
# Setup custom debian-cd to make our changes
run_and_log cp -aT /usr/share/debian-cd simple-cdd/debian-cd
[ $? -eq 0 ] || failure
# Keep 686-pae udebs as we changed the default from 686
# to 686-pae in the debian-installer images
run_and_log sed -i -e '/686-pae/d' \
simple-cdd/debian-cd/data/$CODENAME/exclude-udebs-i386
[ $? -eq 0 ] || failure
# Configure the kali profile with the packages we want
grep -v '^#' kali-config/installer-$KALI_VARIANT/packages \
>simple-cdd/profiles/kali.downloads
run_and_log grep -v '^#' kali-config/installer-$KALI_VARIANT/packages \
> simple-cdd/profiles/kali.downloads
[ $? -eq 0 ] || failure
# Tasksel is required in the mirror for debian-cd
echo tasksel >>simple-cdd/profiles/kali.downloads
run_and_log echo "tasksel" >> simple-cdd/profiles/kali.downloads
[ $? -eq 0 ] || failure
# Grub is the only supported bootloader on arm64
# so ensure it's on the iso for arm64.
if [ "$KALI_ARCH" = "arm64" ]; then
echo "grub-efi-arm64" >>simple-cdd/profiles/kali.downloads
run_and_log echo "grub-efi-arm64" >> simple-cdd/profiles/kali.downloads
[ $? -eq 0 ] || failure
fi
# Update the postinst script
cp bin/kali-finish-install simple-cdd/profiles/kali.postinst
# Run simple-cdd
cd simple-cdd
debug "Stage 2/2 - Build"
cd simple-cdd/
run_and_log build-simple-cdd \
--verbose \
--debug \
--force-root \
--conf simple-cdd.conf \
--dist $CODENAME \
--debian-mirror $kali_mirror
--verbose \
--debug \
--force-root \
--conf simple-cdd.conf \
--dist $CODENAME \
--debian-mirror $kali_mirror
res=$?
cd ..
cd ../
if [ $res -ne 0 ] || [ ! -e $IMAGE_NAME ]; then
failure
fi
;;
esac
# If a command fails, make the whole script exit
set -e
mv $IMAGE_NAME $TARGET_DIR/$(target_image_name $KALI_ARCH)
mv $BUILD_LOG $TARGET_DIR/$(target_build_log $KALI_ARCH)
debug "Moving files"
run_and_log mv -f $IMAGE_NAME $TARGET_DIR/$(target_image_name $KALI_ARCH)
run_and_log mv -f $BUILD_LOG $TARGET_DIR/$(target_build_log $KALI_ARCH)
run_and_log echo -e "\n***\nGENERATED KALI IMAGE: $TARGET_DIR/$(target_image_name $KALI_ARCH)\n***"

@ -1,3 +1,4 @@
# Live Image (UEFI boot)
set default=0
loadfont $prefix/dejavu-bold-16.pf2

@ -1,17 +1,18 @@
# Live Image (UEFI boot)
source /boot/grub/config.cfg
# Live boot
LINUX_LIVE
menuentry "Live system (forensic mode)" {
menuentry "Live (forensic mode)" {
linux KERNEL_LIVE APPEND_LIVE noswap noautomount
initrd INITRD_LIVE
}
menuentry "Live system (persistence, check kali.org/prst)" {
menuentry "Live USB Persistence (check kali.org/prst)" {
linux KERNEL_LIVE APPEND_LIVE persistence
initrd INITRD_LIVE
}
menuentry "Live system (encrypted persistence, check kali.org/prst)" {
menuentry "Live USB Encrypted Persistence (check kali.org/prst)" {
linux KERNEL_LIVE APPEND_LIVE persistent=cryptsetup persistence-encryption=luks persistence
initrd INITRD_LIVE
}
@ -21,12 +22,12 @@ LINUX_INSTALL
if [ ! -e /boot/grub/install.cfg ]; then
menuentry "Start installer with speech synthesis" {
linux KERNEL_GI speakup.synth=soft APPEND_GI
linux KERNEL_GI speakup.synth=soft APPEND_GI
initrd INITRD_GI
}
fi
submenu 'Advanced options...' {
submenu 'Advanced options' {
source /boot/grub/theme.cfg

@ -1,3 +1,4 @@
# Live Image (UEFI boot)
desktop-image: "../splash.png"
title-color: "#ffffff"
title-font: "DejaVu Sans Bold 16"
@ -25,7 +26,7 @@ terminal-font: "Unifont Regular 16"
height = 35
align = "center"
color = "#ffffff"
text = "Kali Linux Live Boot Menu"
text = "Kali Linux live menu (UEFI)"
font = "DejaVu Sans Bold 16"
}

@ -1,16 +0,0 @@
#!/bin/sh
if [ ! -d isolinux ]; then
cd binary
fi
if ! grep "speakup.synth=soft" isolinux/install.cfg >/dev/null; then
cat >>isolinux/install.cfg <<END
label installspk
menu label Install with ^speech synthesis
linux /install/gtk/vmlinuz
initrd /install/gtk/initrd.gz
append video=vesa:ywrap,mtrr vga=788 speakup.synth=soft --- quiet
END
fi

@ -1,4 +1,5 @@
#!/bin/sh
# Live Image (BIOS boot)
if [ ! -d isolinux ]; then
cd binary
@ -12,4 +13,3 @@ label live-forensic
initrd /live/initrd.img
append boot=live username=kali hostname=kali systemd.swap=no noautomount
END

@ -1,4 +1,5 @@
#!/bin/sh
# Live Image (BIOS boot)
if [ ! -d isolinux ]; then
cd binary
@ -7,16 +8,14 @@ fi
cat >>isolinux/live.cfg <<END
label live-persistence
menu label ^Live USB Persistence (check kali.org/prst)
menu label Live ^USB Persistence (check kali.org/prst)
linux /live/vmlinuz
initrd /live/initrd.img
append boot=live username=kali hostname=kali persistence
label live-encrypted-persistence
menu label ^Live USB Encrypted Persistence (check kali.org/prst)
menu label Live USB ^Encrypted Persistence (check kali.org/prst)
linux /live/vmlinuz
initrd /live/initrd.img
append boot=live persistent=cryptsetup persistence-encryption=luks username=kali hostname=kali persistence
END

@ -51,17 +51,24 @@ configure_zsh() {
done
}
configure_kaboxer() {
# Create the group if needed
addgroup --system kaboxer || true
# This is generically named in case we want to add other groups in the future.
configure_usergroups() {
# Create the kaboxer group if needed
addgroup --system kaboxer || true
# Create the wireshark group if needed
addgroup --system wireshark || true
# Add the users to the group
for user in $(get_user_list); do
echo "INFO: adding user '$user' to group 'kaboxer'"
adduser $user kaboxer || true
done
# kaboxer - for kaboxer
# dialout - for serial access
# wireshark - capture sessions in wireshark
kali_groups="kaboxer,dialout,wireshark"
for user in $(get_user_list); do
echo "INFO: adding user '$user' to groups '$kali_groups'"
usermod -a -G "$kali_groups" $user || true
done
}
configure_sources_list
configure_zsh
configure_kaboxer
configure_usergroups

@ -11,7 +11,7 @@ d-i mirror/http/hostname string http.kali.org
d-i mirror/http/directory string /kali
# Disable security, updates and backports
d-i apt-setup/services-select multiselect
d-i apt-setup/services-select multiselect
# Enable contrib and non-free
d-i apt-setup/non-free boolean true
@ -52,7 +52,7 @@ popularity-contest popularity-contest/participate boolean false
console-setup console-setup/charmap47 select UTF-8
samba-common samba-common/dhcp boolean false
macchanger macchanger/automatically_run boolean false
kismet-capture-common kismet-capture-common/install-users string
kismet-capture-common kismet-capture-common/install-users string
kismet-capture-common kismet-capture-common/install-setuid boolean true
wireshark-common wireshark-common/install-setuid boolean true
sslh sslh/inetd_or_standalone select standalone

@ -1,8 +1,11 @@
# Full installer image, it should contain everything offered in tasksel
# during initial installation so all kali-linux-* except
# kali-linux-everything and most desktops.
# Full installer image
# It should contain everything offered in tasksel
# during initial installation so all kali-linux-* except:
# - kali-linux-everything
# Metapackages
# You can customize the set of Kali metapackages (groups of tools) to install
# For the complete list see: https://tools.kali.org/kali-metapackages
kali-linux-core
kali-tools-top10
kali-linux-default
@ -12,5 +15,3 @@ kali-linux-large
kali-desktop-xfce
kali-desktop-gnome
kali-desktop-kde
kali-desktop-lxde
kali-desktop-mate

@ -1,3 +1,4 @@
# Network installer image
# Mostly empty list because netinst has no embedded packages in theory
#
# This variant is not meant to be used with live-build but only with

@ -1,15 +1,19 @@
# You always want those
# Live image
# You always want these:
kali-linux-core
kali-desktop-live
# Kali applications
#<package>
# Metapackages
# You can customize the set of Kali metapackages (groups of tools) to install
# For the complete list see: https://tools.kali.org/kali-metapackages
#kali-linux-core
#kali-tools-top10
kali-linux-default
# kali-linux-large
# kali-linux-everything
# kali-tools-top10
#kali-linux-large
#kali-linux-everything
# Graphical desktop
kali-desktop-e17
# Kali applications
#<package>

@ -1,15 +1,19 @@
# You always want those
# Live image
# You always want these:
kali-linux-core
kali-desktop-live
# Kali applications
#<package>
# Metapackages
# You can customize the set of Kali metapackages (groups of tools) to install
# For the complete list see: https://tools.kali.org/kali-metapackages
#kali-linux-core
#kali-tools-top10
kali-linux-default
# kali-linux-large
# kali-linux-everything
# kali-tools-top10
#kali-linux-large
#kali-linux-everything
# Graphical desktop
kali-desktop-gnome
# Kali applications
#<package>

@ -1,15 +1,19 @@
# You always want those
# Live image
# You always want these:
kali-linux-core
kali-desktop-live
# Kali applications
#<package>
# Metapackages
# You can customize the set of Kali metapackages (groups of tools) to install
# For the complete list see: https://tools.kali.org/kali-metapackages
#kali-linux-core
#kali-tools-top10
kali-linux-default
# kali-linux-large
# kali-linux-everything
# kali-tools-top10
#kali-linux-large
#kali-linux-everything
# Graphical desktop
kali-desktop-i3
# Kali applications
#<package>

@ -1,15 +1,19 @@
# You always want those
# Live image
# You always want these:
kali-linux-core
kali-desktop-live
# Kali applications
#<package>
# Metapackages
# You can customize the set of Kali metapackages (groups of tools) to install
# For the complete list see: https://tools.kali.org/kali-metapackages
#kali-linux-core
#kali-tools-top10
kali-linux-default
# kali-linux-large
# kali-linux-everything
# kali-tools-top10
#kali-linux-large
#kali-linux-everything
# Graphical desktop
kali-desktop-kde
# Kali applications
#<package>

@ -1,15 +1,19 @@
# You always want those
# Live image
# You always want these:
kali-linux-core
kali-desktop-live
# Kali applications
#<package>
# Metapackages
# You can customize the set of Kali metapackages (groups of tools) to install
# For the complete list see: https://tools.kali.org/kali-metapackages
# kali-linux-default
#kali-linux-core
#kali-tools-top10
#kali-linux-default
kali-linux-large
# kali-linux-everything
# kali-tools-top10
#kali-linux-everything
# Graphical desktop
kali-desktop-xfce
# Kali applications
#<package>

@ -1,10 +1,19 @@
# You always want those
# Live image
# You always want these:
kali-linux-core
kali-desktop-live
# Kali applications
# Metapackages
# You can customize the set of Kali metapackages (groups of tools) to install
# For the complete list see: https://tools.kali.org/kali-metapackages
#kali-linux-core
#kali-tools-top10
#kali-linux-default
#kali-linux-large
#kali-linux-everything
# Graphical desktop
kali-desktop-xfce
# Kali applications
#<package>

@ -1,15 +1,19 @@
# You always want those
# Live image
# You always want these:
kali-linux-core
kali-desktop-live
# Kali applications
#<package>
# Metapackages
# You can customize the set of Kali metapackages (groups of tools) to install
# For the complete list see: https://tools.kali.org/kali-metapackages
#kali-linux-core
#kali-tools-top10
kali-linux-default
# kali-linux-large
# kali-linux-everything
# kali-tools-top10
#kali-linux-large
#kali-linux-everything
# Graphical desktop
kali-desktop-lxde
# Kali applications
#<package>

@ -1,15 +1,16 @@
# You always want those
# Live image
# You always want these:
kali-linux-core
kali-desktop-live
# Kali applications
#<package>
# Metapackages
# You can customize the set of Kali metapackages (groups of tools) to install
# For the complete list see: https://tools.kali.org/kali-metapackages
#kali-linux-core
#kali-tools-top10
kali-linux-default
# kali-linux-large
# kali-linux-everything
# kali-tools-top10
#kali-linux-large
#kali-linux-everything
# Graphical desktop
kali-desktop-mate
@ -18,3 +19,6 @@ kali-desktop-mate
#if DISTRIBUTION moto
mate-archive-keyring
#endif
# Kali applications
#<package>

@ -1,15 +1,19 @@
# You always want those
# Live image
# You always want these:
kali-linux-core
kali-desktop-live
# Kali applications
#<package>
# Metapackages
# You can customize the set of Kali metapackages (groups of tools) to install
# For the complete list see: https://tools.kali.org/kali-metapackages
#kali-linux-core
#kali-tools-top10
kali-linux-default
# kali-linux-large
# kali-linux-everything
# kali-tools-top10
#kali-linux-large
#kali-linux-everything
# Graphical desktop
kali-desktop-xfce
# Kali applications
#<package>

@ -1 +0,0 @@
/usr/share/simple-cdd/profiles/default.downloads

@ -1 +0,0 @@
/usr/share/simple-cdd/profiles/default.excludes

@ -1 +0,0 @@
# Disable default packages from simple-cdd

@ -1,3 +0,0 @@
# loads the simple-cdd-profiles udeb to which asks for which profiles to use,
# load the debconf preseeding and queue packages for installation.
d-i preseed/early_command string anna-install simple-cdd-profiles

@ -1 +0,0 @@
simple-cdd-profiles

@ -1,67 +0,0 @@
#!/bin/sh
# The reference version of this script is maintained in
# live-build-config/bin/kali-finish-install.
#
# It is used in multiple places to finish configuring the target system
# and build.sh copies it where required (in the simple-cdd configuration
# and in the live-build configuration).
configure_sources_list() {
if grep -q '^deb ' /etc/apt/sources.list; then
echo "INFO: sources.list is configured, everything is fine"
return
fi
echo "INFO: sources.list is empty, setting up a default one for Kali"
cat >/etc/apt/sources.list <<END
# See https://www.kali.org/docs/general-use/kali-linux-sources-list-repositories/
deb http://http.kali.org/kali kali-rolling main contrib non-free
# Additional line for source packages
# deb-src http://http.kali.org/kali kali-rolling main contrib non-free
END
apt-get update
}
get_user_list() {
for user in $(cd /home && ls); do
if ! getent passwd "$user" >/dev/null; then
echo "WARNING: user '$user' is invalid but /home/$user exists"
continue
fi
echo "$user"
done
echo "root"
}
configure_zsh() {
if grep -q 'nozsh' /proc/cmdline; then
echo "INFO: user opted out of zsh by default"
return
fi
if [ ! -x /usr/bin/zsh ]; then
echo "INFO: /usr/bin/zsh is not available"
return
fi
for user in $(get_user_list); do
echo "INFO: changing default shell of user '$user' to zsh"
chsh --shell /usr/bin/zsh $user
done
}
configure_kaboxer() {
# Create the group if needed
addgroup --system kaboxer || true
# Add the users to the group
for user in $(get_user_list); do
echo "INFO: adding user '$user' to group 'kaboxer'"
adduser $user kaboxer || true
done
}
configure_sources_list
configure_zsh
configure_kaboxer

@ -0,0 +1 @@
../../kali-config/common/includes.installer/kali-finish-install

@ -8,21 +8,20 @@
# Profile Selection
#
# The following four files get included on the CD if present:
# $profile.preseed
# $profile.preseed
# Debconf selections.
# $profile.packages
# Packages to be installed with the profile. Dependencies also will
# $profile.packages
# Packages to be installed with the profile. Dependencies also will
# be installed.
# $profile.downloads
# Additional packages to be included on the CD with this profile, but
# $profile.downloads
# Additional packages to be included on the CD with this profile, but
# not installed by default.
# $profile.postinst
# $profile.postinst
# Post-install script that is run after installing packages.
#
# During the install after base system setup, it will give you the
# During the install after base system setup, it will give you the
# options to determine which profiles you want to install.
# Profiles to include on the CD
#profiles=""
#profiles="x-basic ltsp"
@ -111,7 +110,7 @@ local_packages="$(pwd)/local_packages"
# Call mirror tools at each build- defaults to true.
#do_mirror="false"
# Set your proxy (if any).
# Set your proxy (if any).
#export http_proxy=http://localhost:3128
# Location of debian-cd files

Loading…
Cancel
Save