Skip to content
This repository has been archived by the owner on Apr 25, 2019. It is now read-only.

Commit

Permalink
nethunter-fs: more updates & fixes
Browse files Browse the repository at this point in the history
persistent-net rules should be fine by default, new file names
gcc-arm-none-eabi can be installed by dpkg
zlib1g-dev needed for some pip builds
hostapd-karma.conf is located in /sdcard/nh_files/configs
wlan1 all the hostapd configs

Signed-off-by: James Christopher Adduono <jc@adduono.com>
  • Loading branch information
jcadduono committed Sep 3, 2017
1 parent 1036baf commit 09ba049
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 14 deletions.
2 changes: 1 addition & 1 deletion nethunter-fs/build.sh
Expand Up @@ -151,7 +151,7 @@ pkg_minimal="openssh-server kali-defaults kali-archive-keyring
pkg_full="kali-linux-nethunter mana-toolkit exploitdb lua-sql-sqlite3 msfpc
exe2hexbat bettercap libapache2-mod-php7.0 libreadline6-dev
libncurses5-dev libnewlib-arm-none-eabi binutils-arm-none-eabi
autoconf libtool make gcc-6 g++-6"
gcc-arm-none-eabi autoconf libtool make gcc-6 g++-6 zlib1g-dev"

# ARCH SPECIFIC PACKAGES
pkg_minimal_armhf="abootimg cgpt fake-hwclock vboot-utils vboot-kernel-utils nethunter-utils"
Expand Down
22 changes: 9 additions & 13 deletions nethunter-fs/stages/stage3
Expand Up @@ -30,8 +30,6 @@ debconf-set-selections /debconf.set
rm -f /debconf.set
apt-get -y install locales-all git-core binutils ca-certificates initramfs-tools locales console-common less nano git
echo "root:toor" | chpasswd
sed -i -e 's/KERNEL\!=\"eth\*|/KERNEL\!=\"/' /lib/udev/rules.d/75-persistent-net-generator.rules
rm -f /etc/udev/rules.d/70-persistent-net.rules
echo "I: Installing packages with apt-get: $packages"
apt-get --yes --force-yes install $packages
Expand All @@ -45,7 +43,6 @@ EOF
if [ "$build_size" = full ]; then
# We should run git clone outside chroot because it has issues with machine-code translation
git clone https://github.com/Proxmark/proxmark3.git "$rootfs/opt/proxmark3"
wget "http://repo.kali.org/kali/pool/main/g/gcc-arm-none-eabi/gcc-arm-none-eabi_5.4.1+svn241155-1_${build_arch}.deb" -O "$rootfs/opt/proxmark3/gcc-arm-none-eabi.deb"
git clone https://github.com/adaptivethreat/Empire.git "$rootfs/opt/Empire"

cat << EOF >> "$rootfs/third-stage"
Expand All @@ -57,15 +54,14 @@ a2enmod php7.0
a2dissite 000-mana-toolkit.conf
a2ensite 000-default.conf
cd /opt/proxmark3
# Proxmark3 depends on gcc-arm-none-eabi, so we install it before building
dpkg -i gcc-arm-none-eabi.deb
rm -f gcc-arm-none-eabi.deb
make
if cd /opt/proxmark3; then
make
fi
cd /opt/Empire/setup
chmod +x install.sh
printf "\n" | ./install.sh
if cd /opt/Empire/setup; then
chmod +x install.sh
printf "\n" | ./install.sh
fi
EOF
# End of third-stage script append
fi
Expand Down Expand Up @@ -110,8 +106,8 @@ cp dictionary/wordlist.txt "$rootfs/opt/dic/wordlist.txt"
cp dictionary/pinlist.txt "$rootfs/opt/dic/pinlist.txt"

# Sets the default for hostapd.conf to the mana karma version
sed -i 's#^DAEMON_CONF=.*#DAEMON_CONF=/etc/mana-toolkit/hostapd-karma.conf#' "$rootfs/etc/init.d/hostapd"
sed -i 's/wlan0/wlan1/g' "$rootfs/etc/mana-toolkit/hostapd-karma.conf"
sed -i 's#^DAEMON_CONF=.*#DAEMON_CONF=/sdcard/nh_files/configs/hostapd-karma.conf#' "$rootfs/etc/init.d/hostapd"
sed -i 's/wlan0/wlan1/g' "$rootfs/etc/mana-toolkit/hostapd-mana-"*

# DNSMASQ Configuration options for optional access point
cat << EOF > "$rootfs/etc/dnsmasq.conf"
Expand Down

0 comments on commit 09ba049

Please sign in to comment.