타이거팀 (번역 아티클)

데비안 우분투 리눅스에서 katoollin을 이용해 칼리의 침투테스트 툴 골라 설치하기 본문

테크아티클번역

데비안 우분투 리눅스에서 katoollin을 이용해 칼리의 침투테스트 툴 골라 설치하기

타이거팀 2017. 11. 11. 21:28

원문:   https://linuxsproutes.com/install-kali-linux-tools-using-katoolin-linux/


Install Kali Linux Tools Using Katoolin In Linux



데비안 우분투 리눅스에서 katoollin 툴을 이용해 칼리 침투테스트 툴 골라서 설치하기 



This tutorial walk you through installing Kali Linux Tools using Katoolin in Ubuntu. For those who don’t know, Katoolin is a Python script which is used to install all Kali Linux tools either automatically or manually. Kali Linux has more than 300 penetration testing tools. Instead of installing tools, you can have only selective tools of your choice in your Linux box. If you only wanted to try the Kali Linux tools, you should give Katoolin a try. It will add Kali Linux repositories in your Ubuntu system, so that you can either install all pentesting tools automatically or only what is necessary. Katoolin is completely free and is officially tested on Debian based systems.


이 튜토리얼은 데비안이나 우분투 리눅스 유저도 Lionsec의 katoollin 툴을 이용해 모의침투 전용 운영체제인 칼리리눅스의 침투테스트 툴들을 설치할수 있게 도와주는 내용이다.   

katoollin은 약 300여개에 달하는 칼리리눅스의 침투테스트 툴을 자동 설치 하거나 몇개만 골라서 수동 설치하도록 도와주는 파이썬 스크립트이다. 나의 데비안 9 리눅스 머신에 설치할 침투테스트 툴들만 입맛대로 골라주면 된다. 

칼리리눅스에서 각각의 침투테스트용 툴의 설치에 쓰는 칼리 리눅스의 리포지터리를 데비안이나 우분투 리눅스에서도 설치할수 있도록  /etc/apt/source.list 파일에 추가해주는 역할을 가장 먼저 한다.  데비안 리눅스는 DEB 패키징을 하는 리눅스 계열에서  거의 기원이다. 우분투 리눅스와 칼리 리눅스는 데비안 리눅스 기반에서 파생되어 나왔기때문에 서로 호환성이 매우 높다.





Katoolin 설치하기 


I have tested Katoolin in Ubuntu 16.04 LTS server edition. However, It should work on other Ubuntu derivatives.
Since it is written using Python language, you need to install Python on your Linux box.


원문은 우분투 16.04 LTS (롱텀서포트) 서버 버전으로 테스트했다. 그렇지만 우분투 하위 다른 버전도 잘 돌아간다.  LionSec 컴퍼니의 개발진이 파이썬 스크립트 언어로 개발했기때문에 파이썬 인터프리터가 동작할 수 있어야한다.  만액 없으면 git과 pyton을 apt-get  install 명령으로 설치하자.  의역된 번역판에서는 데비안 9를 사용하겠다. 


To install python and other required prerequisites on DEB based systems, run:
sudo apt-get install python git


데비안 리눅스 기반 시스템에서 필수 설치요소인 파이썬과 git을 한꺼번에 설치하는 명령어다. 

sudo apt-get install python git



After installing the prerequisites, install Katoolin as shown below:

시스템 필수요소의 설치후엔  일단 수퍼유저 권한으로 바로 변경한다.  


sudo su


그리고 python이나 git이 우분투나 데비안에 이미 설치되어있다면 다음 단계로 넘어간다.  

아래는 git을 이용해서 Katoolin.py 코드를 /usr/bin 아래로 복사하고, 실행 권한도 주는 과정이다. 


git clone https://github.com/LionSec/katoolin.git 
cp katoolin/katoolin.py /usr/bin/katoolin
chmod +x /usr/bin/katoolin




git clone으로 katoolin 프로젝트를  현재 디렉토리에 추가 클론을 만들었다. 

데비안 9에는 pytrhon  2.7이 내장되어 있어서 파이썬 인터프리터 설치과정은 생략했다. 






We have now installed Katoolin. Let us go ahead and see how to use it.




사용법

All commands should be run as root user. As I have mentioned in the previous section, run the following command to switch to the root user if you didn’t do it already.

모든 커맨드는 반드시 루트 유저 권한으로 동작시킨다.  katoolin이 설치된 디렉토리에 cd katoolin으로 직접 이동한뒤 데비안 9  루트 터미널콘솔에서  파이썬 스크립트를 실행시키는  python  katoolin.py 로 직접 실행시켜도 된다. 



sudo su



To launch Katoolin, run the following command:

자, 이제 실행권한을 준 katoolin을 실행시킨다. 


katoolin


This is how katoolin command line interface looks like.


커맨드 라인 인터페이스가 나온다. 



$$ |$$ / $$$$$$\ $$$$$$\ $$$$$$\ $$$$$$\ $$ |$$\ $$$$$$$\ 
 $$$$$ / \____$$\ \_$$ _| $$ __$$\ $$ __$$\ $$ |$$ |$$ __$$\ 
 $$ $$< $$$$$$$ | Kali linux tools installer |$$ |$$ |$$ | $$ |
 $$ |\$$\ $$ __$$ | $$ |$$\ $$ | $$ |$$ | $$ |$$ |$$ |$$ | $$ |
 $$ | \$$\ \$$$$$$$ | \$$$$ |\$$$$$$ |\$$$$$$ |$$ |$$ |$$ | $$ |
 \__| \__| \_______| \____/ \______/ \______/ \__|\__|\__| \__| V1.1


 + -- -- +=[ Author: LionSec | Homepage: www.lionsec.net
 + -- -- +=[ 331 Tools


[W] Before updating your system , please remove all Kali-linux repositories to avoid any kind of problem .

1) Add Kali repositories & Update 
2) View Categories
3) Install classicmenu indicator
4) Install Kali menu
5) Help

kat >





커맨드라인 창에서 katoolin 의 메인 메뉴를 살펴보면 



1) Add Kali repositories & Update 
   
   칼리 리포지터리 저장소를  덧붙이고, 업데이트 하기 


2) View Categories

   카테고리별로 보기 


3) Install classicmenu indicator

   클래스메뉴 인디케이터 설치하기 


4) Install Kali menu

   칼리 메뉴를 설치하기 

5) Help

  도움말




 

깃허브에서 제작사인 LionSec을 찾아본다.  


https://github.com/Lionsec


 LionSec은 커스텀 리눅스인 LionSec OS등 다양한 제품이 있는데, 여기엔 LionSecdml  대표 깃허브 프로젝트가 3개 보인다.   katoolin을 찾아들어간다.  xerosploit등도 <침투테스트 툴> 코너에서 다룰 예정이다. 




 

    프로젝트페이지에서 상단 우측의 Clone or Download 버튼을 누른다. 

    아래에 나타나는 https://github.com/LionSec/katoolin.git  링크를 마우스로 복사한다.

  



   

git clone 명령으로 현재 디렉토리 /home/tiger/download 아래에 katoolin 프로젝트의 클론을 만들어낸다.


git clone   https://github.com/LionSec/katoolin.git


프로젝트 클론이 만들어진 하위 디렉토리인 katoolin 디렉토리에 찾아들어간다.


cd   katoolin




해당 katoolin 디렉토리에는 .py 파일이 하나만 있다. python 명령으로 파이썬 스크립트를 실행시킨다. 


python   katoolin.py 

이제 katoolin 커맨드라인 인터페이스가 실행되었다. 





katoolin 툴의 메인 메뉴중 

1) Add Kali repositories & Update 
   
   "칼리 리포지터리 저장소를  덧붙이고, 업데이트 하기"  메뉴부터 먼저 보자. 


    선택하면 또다른 서브메뉴가 나온다. 

    이전 메인메뉴로 돌아갈땐  back 이나 gohome을 사용할수있다.


              1)  Add kali linux repositories 

              2)  update 

              3)  remove all kali linux repositiries 

              4)  View thre contents of sources.list file


                    what do you want to do? 




데비안 9에서는 /etc/apt/sources.list 내용을 열어보면 다음처럼 나온다. 



        서브메뉴의 

        1) Add kali linux repositories  로 칼리리눅스용 리포지터리를 데비안 9에 강제로 추가하게 하고,





              4) View the contents of sources.list file 로 sources.list 파일의 내용물을 확인해보면 





     # Kali Linux repositories  |  Added by Katoolin 
     deb http://http.kali.org/kali kali-rolling main contrib non-free


     이라는 표시가 보인다.  칼리용 리포지터리가 추가되었다.  



아니면 nano 편집기로  /etc/apt/sources.list 파일을 편집해서 칼리 침투테스트 툴용 리포티터리를 해당 파일의 맨 마지막 부분에 끼워넣어도 된다. 


deb http://http.kali.org/kali kali-rolling main contrib non-free

sources.list 파일에 새로운 리포지터리를 추가하거나 교체한 후에는 항상  apt-get update 를 해줘야한다.  

그걸 대신하는게 서브메뉴 2번이다.


              1)  Add kali linux repositories 

              2)  update 

              3)  remove all kali linux repositiries 

              4)  View thre contents of sources.list file


                    what do you want to do? 



이전 메인메뉴로 돌아갈땐  back 이나 gohome을 사용할 수 있다.





ExploIttation Tool 설치하기 




katoolin 메인 메뉴에서 칼리 침투테스트용 툴을 두개 정도만  선택해서 설치해보자. 

데비안리눅스 9에는 설치되어있지 않은 armitage와 sqlmap을 설치해보려고 한다. 

패키지명을 잘 모르겠지만, 둘 다 취약점을 찾는 툴이므로 해당 분야애서 해당 침투테스트 툴을 찾으면 된다.




메인메뉴에서  2) View Categories  메뉴는

   카테고리별로 툴의 성격을 잘 분류해놓은 메뉴가 나온다. 

   14가지 분류표가 나오는데, 그중   8번 Exploitiation Tools를 선택한다. 



     

 

      다시 여러개의 툴 이름이 나열되는데, Armitage를 설치하려면 1번,  sqlmap을 설치하려면 15번을 선택해준다. 


      해당 카테고리의 툴을 전부 설치하려면  0번을 선택한다.  







     필요로하는 sqlmap 툴이 설치되었다.