블로그 이미지
훅크선장

카테고리

분류 전체보기 (360)
사진이야기 (23)
펭귄컴퓨팅 (120)
컴퓨터보안 (83)
절름발이 프로그래머 (59)
하드웨어개조 (23)
멀알려줄까 (35)
홈베이킹&홈쿠킹 (2)
잡다한것들 (15)
Total
Today
Yesterday

달력

« » 2024.3
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31

공지사항

태그목록

최근에 올라온 글

This guide will show you how to make the Internationalized Kali Linux ISO. Although there are several documents for“Customizing Kali Linux”in the KALI LINUX OFFICIAL DOCUMENTATION (also there is a documentation for“Live Build a Custom Kali ISO”),  There is no documentation about how to make the Internationalized Kali Linux ISO. That’s why I wrote this guide. *^ ^*


http://docs.kali.org/category/development

http://docs.kali.org/development/live-build-a-custom-kali-iso


If you referred this guide of making the Korean Kali Linux ISO, you would easily make a Internationalized Kali Linux ISO which has the default language of you own native language.


※This guide will show some methods which do not exist in the KALI LINUX OFFICIAL DOCUMENTATION, I always referred to the Debian Live-Build manuals.

https://debian-live.alioth.debian.org/live-manual/stable/manual/html/live-manual.en.html


Here we go~!


1. Preparation

1-1) Download the original Kali Linux System

You can download a Kali Linux image from the internet webpages of “Kali Linux Downloads”. https://www.kali.org/downloads/


1-2) Install the Kali Linux onto a computer (A real computer could be much better, but a VM machine doesn’t matter. Actually I prefer the VMware Workstation.)

Because you want to make a new Kali Linux image, you must allocate more than 10G Bytes free space of HDD excluding the Kali Linux OS space when you install a Kali Linux.

You could make a new Kali image on a Live booting Kali Linux, but you have to make free space of disk and mount to your Live booting Kali Linux. At least, you should be a intermediate linux user. If not, it will be a hard journey. So I recommend you to install a new Kali Linux system, which would be a easy way to go.


If you are not familiar with a installation of the Kali Linux, there are many installation guides on the internet like the followings.

http://docs.kali.org/category/installation

https://www.youtube.com/watch?v=cfrCMUH2dIE

http://www.hackingtutorials.org/general-tutorials/kali-linux-installation/


※ You can find the installation guides of the Kali Linux which is written by your own language on the web, Please use the web search engine like Google.


※ It doesn’t matter which language environment is used on a Kali Linux system when making the internationalized Kali Linux images. Basically you can make any internationalized Kali Linux image on the original Kali Linux system of the English environment. 


1-3) Check the Internet line (The faster a Internet line is, the more quickly you make a image)

Because the Live-Build process will download all the package files from the Internet, the speed of Internet line will affect the total time of making images. From my experiences, it will take more than 2~3 hours to complete the Live-Build process. But the total time would vary with the line speed and the computer performance.



2. Installation of Live-Build package

After booting with the installed Kali Linux system, Log-in to the system and open a terminal, then type the commands as shown in this guide.

If you are not familiar with the linux commands, Please use Copy & Paste. *^ ^*


2-1) Update the list of packages

root@kali:~#  apt-get update


2-2) Install the packages for the custom build of Kali Linux images

root@kali:~#  apt-get install curl git live-build cdebootstrap apt-cacher-ng



3. Set-up for the custom build of Kali Linux


3-1) Move to the directory of the custom build and download the basic template of Kali Linux

(I will use /mnt directory for the custom build, you can use any directory or make a new one for the custom build.)

root@kali:~#  cd /mnt

root@kali:/mnt# git clone git://git.kali.org/live-build-config.git


Now, you can see new “live-build-config” directory for the custom build settings.


3-2) Set the Korean locale and the keyboard layout

root@kali:/mnt# cd /mnt/live-build-config/auto

root@kali:/mnt/live-build-config/auto# vi config

...

                --bootappend-live "boot=live username=root hostname=kali" \

...


You have to change the 137th line of “config” file like the following, and save the file.

...

                --bootappend-live "boot=live noconfig=sudo username=root hostname=kali ignore_uuid locales=ko_KR.UTF-8 keyboard-layouts=kr keyboard-variants=alt-intl" \

...



YOU MUST BE CAREFUL TO CHANGE THE “config” FILE! Kali Development Team warn everyone not to touch this “config” file, but there is no way except to change this file for making the internationalized Kali Linux ISO. YOU MUST CHECK AGAIN AND AGAIN WHEN CHANGING THE “config” FILE!!!


3-3) Set the package list for Korean fonts, Korean Input method and so on

You can also add the packages for your own need in the custom build. I will add the packages for Korean environment. The file name for the list is “mypackages.chroot.list”.


root@kali:/mnt/live-build-config/auto# cd /mnt/live-build-config/kali-config/common/package-lists

root@kali:/mnt/live-build-config/kali-config/common/package-lists# vi mypackages.chroot.list

nabi

libhangul-data

libhangul1

fonts-nanum

fonts-nanum-coding

fonts-nanum-eco

fonts-nanum-extra

fonts-unfonts-core

fonts-unfonts-extra

im-config

iceweasel

iceweasel-l10n-ko

icedove

icedove-l10n-ko

wicd-gtk

lynx

etherape

gdebi

gtk-recordmydesktop

remmina

htop

nethogs

filezilla

filezilla-common

tor

unace

rar

p7zip-rar

file-roller

pepperflashplugin-nonfree

open-vm-tools

open-vm-tools-desktop

open-vm-tools-dev

open-vm-tools-dkms

gnuradio

gr-osmosdr

osmo-sdr

inspectrum


I showed the purpose of the packages as the followings.

# For Korean environment

# Korean Input Method

nabi

libhangul-data

libhangul1

# Korean fonts

fonts-nanum

fonts-nanum-coding

fonts-nanum-eco

fonts-nanum-extra

fonts-unfonts-core

fonts-unfonts-extra

# Input Method Switcher

im-config

# Additional packages for my own need

iceweasel

iceweasel-l10n-ko

icedove

icedove-l10n-ko

wicd-gtk

lynx

etherape

gdebi

gtk-recordmydesktop

remmina

htop

nethogs

filezilla

filezilla-common

tor

unace

rar

p7zip-rar

file-roller

# Adobe Flash Plug-in

flashplugin-nonfree

# For using the VM environment

open-vm-tools

open-vm-tools-desktop

open-vm-tools-dev

open-vm-tools-dkms



3-4) Make a auto-execute script file for setting of Korean Input Method

On the previous procedure, you added nabi package for Korean Input, but Korean Input method is not working yet. You must run the command for changing the setting of Input method. While booting the Live Kali Linux, you can run the specific command in a script file by “hook”function. If you add a shell script file to “hooks” directory, a shell script file would be inserted to the ISO image and would be executed when the Live Kali linux boots. You can make a shell script file like the followings and name it whatever you want.


root@kali:/mnt/live-build-config/kali-config/common/package-lists# cd /mnt/live-build-config/kali-config/common/hooks/live

root@kali:/mnt/live-build-config/kali-config/common/hooks/live# vi 0500-enable-hangul-xim.hook.chroot 

#!/bin/sh

# Enable hangul-xim setting to use nabi

im-config -n hangul


After making the script file, you have to make the file executable by adding a execute permission. 


root@kali:/mnt/live-build-config/kali-config/common/hooks# chmod 755 0500-enable-hangul-xim.hook.chroot 



3-5) Add some files for program settings in a Live filesystem of Kali Linux (These procedure are not mandatory, If you don’t need it, Just pass!)

When you boot the Live Kali Linux, you might need a file or some files on a specific directory. For example, I always need a modified /root/.bashrc file for my convenient, so I have inserted the modified .bashrc file to “/mnt/live-build-config/kali-config/common/includes.chroot/root/“. In a Live-Build structure, “/mnt/live-build-config/kali-config/common/includes.chroot/”directory would be the root directory for the new Live Kali Linux System, you can add any file to this linux filesystem hierarchy. Every directories and files under the “/mnt/live-build-config/kali-config/common/includes.chroot/”directory will be copied to the Live Kali Linux filesystem after booting. Please be careful, Do not mess up the directories with unnecessary files.


root@kali:/mnt/live-build-config/kali-config/common/hooks# cd /mnt/live-build-config/kali-config/common/includes.chroot

root@kali:/mnt/live-build-config/kali-config/common/includes.chroot# cd root

root@kali:/mnt/live-build-config/kali-config/common/includes.chroot/root# cp /root/.bashrc .

root@kali:/mnt/live-build-config/kali-config/common/includes.chroot/root# vi .bashrc

...

#alias ll='ls -l'

...


Change the above line like the following for making an alias of a linux list command.  


...

alias ll='ls -la'

...



3-6) Add a Debian package file of .deb for installation 

If you need a specific .deb package file in the Live-Build process, you have to locate a .deb file in “/mnt/live-build-config/kali-config/common/packages.chroot/” directory.

Sometime you might want to add a un-official package to the Live Kali Linux, then you can use this directory.

※ A un-official package .deb file must have a filename of the official Debian convention.


root@kali:/mnt/live-build-config# cd kali-config/common

root@kali:/mnt/live-build-config/kali-config/common# mkdir packages.chroot && cd packages.chroot

root@kali:/mnt/live-build-config/kali-config/common/packages.chroot# cp ~/root/xxxxxxxx.deb  .



4. Build the new image

You have setup all the things, Now, you can build the new Kali Linux image.

First move to the build directory.

root@kali:/mnt/live-build-config/kali-config/common/includes.chroot/root/.nabi# cd /mnt/live-build-config


If you just execute the basic script for build like the following,

root@kali:/mnt/live-build-config# ./build.sh


A custom DVD ISO file which has the same system type of current system and has the default X-windows manager of Gnome will be generated in “/mnt/live-build-config/images” directory.

(While building, a .log file of build log will be generated in the same directory of “/mnt/live-build-config/images”. But there are no screen log)


I would recommend you to build a custom DVD ISO with the “build.sh” script with options like the followings

root@kali:/mnt/live-build-config# ./build.sh --arch [CPU type] --distribution [distribution version nickname] --variant [X-Window manager type] --verbose


If possible, you’d better execute the build script for screen logs like the following.

root@kali:/mnt/live-build-config# ./build.sh --distribution kali-rolling --verbose

Last “—verbose” option will make screen logs with the log file too.

CPU type can be chosen from i386 or amd64. i386 means 32bit system, and amd64 means 64bit system.

We do not have any other option for “distribution version nickname”, you have to type “kali-rolling” now. 

X-Windows manager type means the user interface of Kali Linux. You can choose your favorite desktop view & user interface.  X-Windows manager types are gnome which is the default, xfce which was the default of 1.1.0 version, KDE, e17, i3wm, light, lede and mate. But in my experience, Only gnome, xfce and lxde can be made for Korean. I failed to make Korean version of Kali Linux with KDE, e17, i3wm, light and mate.


For example, If you want to make a 64bit xfce version, you have to type the following command.

root@kali:/mnt/live-build-config# ./build.sh --arch amd64 --distribution kali-rolling --variant xfce --verbose


If you want to make a 32bit lxde version, you have to type the following command.

root@kali:/mnt/live-build-config# ./build.sh --arch i386 --distribution kali-rolling --variant lxde --verbose



Thanks to “Hans Ullrich”for his document of making a German Kali Linux. I have referred his document for a long time and I can make my own Korean Kali Linux because of him.

http://www.ccpeine.de/?p=1152

Posted by 훅크선장
, |