Skip to content

Commit 5f8a171

Browse files
authored
Update hacktrack.sh
1 parent 5ca27d7 commit 5f8a171

File tree

1 file changed

+60
-0
lines changed

1 file changed

+60
-0
lines changed

hacktrack.sh

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,61 @@
11
#!/bin/bash
2+
# Script Arsip Hacktrack
3+
# make folder work
4+
mkdir hacktrack && cd hacktrack
5+
mkdir -p image/{live,isolinux,.disk}
6+
sudo debootstrap --arch=i386 --variant=minbase jessie /home/dindin/hacktrack/chroot http://ftp.us.debian.org/debian
7+
sudo mount --bind /dev/ chroot/dev/
8+
sudo cp /etc/resolv.conf chroot/etc/
9+
sudo chroot chroot
10+
export HOME=/root
11+
export LC_ALL=C
12+
mount -t proc none /proc
13+
mount -t sysfs none /sys
14+
mount -t devpts none /dev/pts
15+
passwd root
16+
echo "live" > /etc/hostname
17+
cd /etc/skel
18+
mkdir Desktop Documents Downloads Music Pictures Public Templates Videos
19+
cd /
20+
apt-get update && apt-get install nano
21+
cd /etc/apt/
22+
nano sources.list
23+
# Core Debian Jessie "8"
24+
deb http://ftp.us.debian.org/debian jessie main contrib non-free
25+
deb-src http://ftp.us.debian.org/debian jessie main contrib non-free
26+
# Updates Debian Jessie "8"
27+
deb http://ftp.us.debian.org/debian jessie-updates main contrib non-free
28+
deb-src http://ftp.us.debian.org/debian jessie-updates main contrib non-free
29+
# Updates Security Debian Jessie "8"
30+
deb http://security.debian.org/ jessie/updates main contrib non-free
31+
deb-src http://security.debian.org/ jessie/updates main contrib non-free
32+
apt-get update && apt-get upgrade
33+
34+
35+
36+
cd /home/dindin/hacktrack/
37+
sudo cp chroot/boot/vmlinuz-3.16.0-4-586 image/live/vmlinuz
38+
sudo cp chroot/boot/initrd.img-3.16.0-4-586 image/live/initrd.lz
39+
sudo cp /usr/lib/syslinux/isolinux.bin image/isolinux/
40+
41+
cd /home/dindin/hacktrack/
42+
# STANDAR
43+
sudo mksquashfs chroot image/live/filesystem.squashfs
44+
# UNKNOW
45+
sudo mksquashfs chroot image/live/filesystem.squashfs -e boot
46+
# HIGH COMPRESS
47+
sudo mksquashfs chroot image/live/filesystem.squashfs -b 1048576 -comp xz -Xdict-size 100%
48+
49+
sudo su
50+
sudo chroot chroot dpkg-query -W --showformat='${Package} ${Version}\n' > image/live/filesystem.manifest
51+
printf $(sudo du -sx --block-size=1 chroot | cut -f1) > image/live/filesystem.size
52+
exit
53+
54+
cd image/
55+
sudo rm MD5SUMS
56+
find -type f -print0 | sudo xargs -0 md5sum | grep -v isolinux/boot.cat | sudo tee MD5SUMS
57+
cd ..
58+
sudo mkisofs -r -V "hacktrack-2017.1-i386" -cache-inodes -J -l -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o ../hacktrack-2017.1CORE-i386.iso image
59+
cd .. && sudo chmod 777 hacktrack-2017.1-i386.iso
60+
isohybrid hacktrack-2017.1-i386.iso
61+
md5sum hacktrack-2017.1-i386.iso > hacktrack-2017.1-i386.iso.md5sums

0 commit comments

Comments
 (0)