重塑Kali Linux——定制为王
定制为王实推 ArchLinux. ;) 各位看官继续………………………………………
号外.Linux爱好者..有木有团队收人..focus on pentest&code -_-!!!!
=======================================================================================
0×00 准备工作
下载官方ISO不解释.确认下源里面是不是存在配置正常的. cat /etc/apt/sources.list:
view source1 deb http://http.kali.org/kali kali main non-free contrib
2 deb-src http://http.kali.org/kali kali main non-free contrib
常规升级 apt-get update && apt-get dist-upgrade
另外别手贱去修改Gnome的菜单,会给原来的Kali定义的菜单配置冲突.如果手贱了把Gnome的配置干掉:
view source1 rm ~/.config/menus
另外个人喜好,喜欢用geany和pidgin(有otr)之类的.取舍下软件…
0×01 自定义ISO工具
主要是用来制作LiveCD的几个工具需要安装好:
apt-get install git live-build cdebootstrap kali-archive-keyring apt-cacher-ng
0×02 走起
建立chroot
touch standard.list.chroot
这里可能会需要添加一些你自己的软件包神马的,比如初始安装的Kali的网络管理器就没安装pptp的vpn,so….
或者新建一个”standard.list.chroot”文件,拷贝到/root/目录,下面给出一个俺自己的用的表:
! Packages Priority standard
geany
preload
gtk-recordmydesktop
galculator
synaptic
aria2
cpuid
network-manager-pptp
network-manager-pptp-gnome
network-manager-openvpn
network-manager-openvpn-gnome
network-manager-vpnc
network-manager-vpnc-gnome
isomaster
xchat-common
xchat
libreoffice
shutter
——-本子没有蓝牙的下面就不要装了——-
bluez-gstreamer
bluez-compat
bluez-alsa
bluez-cups
0×03 节奏
把内容如下的update-kali文件拷贝到 /root/directory 目录
view source1 apt-get update
2 apt-get -y dist-upgrade
3 apt-get –purge -y autoclean
4 apt-get –purge -y autoremove
确定其可执行权限
view source1 chmod +x update-kali
0×04 单杀
拷贝如下内容的rebuild-kali文件到 /root/ directory 目录
# 清理老的配置文件并替换新配置
view source01 echo "Removing the previous live-build-config direcotry …."
02 cd /root/
03 rm -R live-build-config
04 echo "Getting the new live-build-config file …."
05 git clone git://git.kali.org/live-build-config.git
06 echo "Copying the customized standard.list.chroot from /root/ …."
07 cp /root/standard.list.chroot /root/live-build-config/config/package-lists/
08 echo "Copying the update-kali and rebuild-kali scripts from /root/ …."
09 cp /root/update-kali /root/live-build-config/config/includes.chroot/root/
10 cp /root/rebuild-kali /root/live-build-config/config/includes.chroot/root/
11 echo "Enable the apt-cacher-ng …."
12 /etc/init.d/apt-cacher-ng restart
13 export http_proxy=http://localhost:3142/
14 cd live-build-config
15 echo "Be patient …. Building amd64.iso and i386.iso …."
16 echo "It will takes 4-6 hours or more to complete …."
17 echo "Please DON’T close this terminal …."
18 ./build_all.sh
确认其执行权限
view source1 chmod +x rebuild-kali
0×05 M0nster Kill…
如果是装的x64的话,可以同时制作amd64.iso和i386.iso(可以支持PAE)
如果只装了x86那就只能编译x86的ISO撸~
总共大约要话费4~6个小时.看机器配置吧.
just execute~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./rebuild-kali
最后会在/root/live-build-config/images/目录生成ISO镜像
0×06 VM-Tools
应该很多都是在VM下做ISO封装的吧…顺便说下怎么装open-vm-tools.我用的VMPlayer没有集成VM自己的ISO,并且那玩意儿体积实在是很大啊.
确定下源先,要不然没法update和装linux内核头文件,装vm-tools啥的就这点了.
view source1 apt-get update && apt-get install -y linux-headers-$(uname -r)
装当前对应内核的头文件
open-vm-tools可以从官网下载
http://sourceforge.net/projects/open-vm-tools/
安装
view source1 sudo sh ./configure
如果出错的话可以尝试
view source1 sudo sh ./configure -without-pam –without-x –without-procps –without-dnet –without-icu
当然也可以用apt安装
view source1 apt-get install open-vm-tools
顺道说下原生VM-tools
原生VM-tools可能需要一些必要的软件包和手动配置,如下
view source1 echo cups enabled >> /usr/sbin/update-rc.d
2 echo vmware-tools enabled >> /usr/sbin/update-rc.d
3 apt-get install gcc make linux-headers-$(uname -r)
4 ln -s /usr/src/linux-headers-$(uname -r)/include/generated/uapi/linux/version.h /usr/src/linux-headers-$(uname -r)/include/linux/
载入原生VMTools的ISO,一般都会自动挂载,不自动挂载就给丫手动吧,拷贝到tmp
view source1 mkdir /mnt/vmware
2 mount /dev/cdrom /mnt/vmware/
3 cp -rf /mnt/vmware/VMwareTools* /tmp/
解压并安装
view source1 cd /tmp/
2 tar zxpf VMwareTools-.tar.gz
3 cd vmware-tools-distrib/
4 ./vmware-tools-install
0×07 N卡恒久不便的问题
N卡的搓比闭源驱动.A卡兼容好,默认不需要再多搞些神马了.
view source1 apt-get install nvidia-detect nvidia-libopencl1 nvidia-opencl-common nvidia-support nvidia-opencl-icd nvidia-visual-profiler nvidia-glx nvidia-installer-cleanup nvidia-kernel-common nvidia-smi nvidia-alternative nvidia-opencl-dev libglx-nvidia-alternatives nvidia-kernel-dkms nvidia-cuda-toolkit nvidia-vdpau-driver nvidia-xconfig glx-alternative-nvidia libgl1-nvidia-alternatives nvidia-settings libgl1-nvidia-glx xserver-xorg-video-nvidia libcublas4 libcudart4 libcufft4 libnpp4 libnvidia-compiler libcuda1 libcuinj4 libnvidia-ml1 libxvmcnvidia1 libcusparse4 libcurand4 python-pycuda-doc python-pycuda-headers python-pycuda nvidia-cuda-doc nvidia-cuda-gdb
上面是老驱动.
不爽去官网下吧…….一样装……….
Note:
有的CPU可能不支持PAE,那样的话还需要做一些工作:
1~4步骤是必须的.在获取配置的时候来点修改
view source1 cd /root/
2 rm -R live-build-config
3 git clone git://git.kali.org/live-build-config.git
4 cp /root/standard.list.chroot /root/live-build-config/config/package-lists/
5 cp /root/update-kali /root/live-build-config/config/includes.chroot/root/
6 cp /root/rebuild-kali /root/live-build-config/config/includes.chroot/root/
7 cd live-build-config
8 cd auto
编辑config
view source1 vim config
找到下面的地方修改
view source1 lb_opts=”–debian-installer live –linux-flavours 686-pae”
替换成
view source1 lb_opts=”–debian-installer live –linux-flavours 486″
:wq保存并退出
最后
view source1 cd /root/live-build-config
2 /etc/init.d/apt-cacher-ng restart
3 export http_proxy=http://localhost:3142/
4 lb config –architecture i386
5 lb build
官方是有Guide的哦~要不我再多写一点?
Reference:
http://cn.docs.kali.org/live-build-cn/%E5%B0%81%E8%A3%85%E5%AE%9A%E5%88%B6%E7%9A%84kali-live-iso
http://www.kalilinux.net/community/threads/building-custom-kali-images.20/
link:http://www.blackh4t.org/archives/740.html
上一篇: 对比Intel/AMD!骁龙835 Win10电脑性能公布:堪用
下一篇: 他的日记本