avatar

目录
树莓派系统(基于Debian)安装kali工具

树莓派系统(基于Debian)安装kali工具

软件

katoolin4china

原软件为katoolin,katoolin4china将内部的软件源改为清华源,对国内用户更友好

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

katoolin4china
https://github.com/SuperSuperSuperSuper5/katoolin4china

使用方法

  1. 先将这个仓库clone下来

先安装git
sudo apt-get install git
为了以后的方便管理,在/home/目录下,先建一个目录,将克隆的东西放进去

Code
mkdir Kalitool
cd Kalitool

开始克隆

Code
git clone https://github.com/SuperSuperSuperSuper5/katoolin4china.git

现在本地目录下已经有一个文件夹了,进去

Code
cd katoolin4china
sudo cp katoolin4china.py /usr/bin/katoolin4china
sudo chmod +x /usr/bin/katoolin4china

然后就可以使用这个工具了
sudo katoolin4china

  1. 配置katoolin4china

    Code
    $$\   $$\             $$\                         $$\ $$\           
    $$ | $$ | $$ | $$ |\__|
    $$ |$$ / $$$$$$\ $$$$$$\ $$$$$$\ $$$$$$\ $$ |$$\ $$$$$$$\
    $$$$$ / \____$$\ \_$$ _| $$ __$$\ $$ __$$\ $$ |$$ |$$ __$$\
    $$ $$< $$$$$$$ | Kali linux tools installer |$$ |$$ |$$ | $$ |
    $$ |\$$\ $$ __$$ | $$ |$$\ $$ | $$ |$$ | $$ |$$ |$$ |$$ | $$ |
    $$ | \$$\ \$$$$$$$ | \$$$$ |\$$$$$$ |\$$$$$$ |$$ |$$ |$$ | $$ |
    \__| \__| \_______| \____/ \______/ \______/ \__|\__|\__| \__| V1.0
    + -- -- +=[ Author: LionSec | Homepage: www.lionsec.net
    + -- -- +=[ 330 Tools
    1) Add Kali repositories & Update
    2) View Categories
    3) Install classicmenu indicator
    4) Install Kali menu
    5) Help

    按2查看可使用的工具

    Code
    kat > 2
    **************************** All Categories *****************************
    1) Information Gathering 8) Exploitation Tools
    2) Vulnerability Analysis 9) Forensics Tools
    3) Wireless Attacks 10) Stress Testing
    4) Web Applications 11) Password Attacks
    5) Sniffing & Spoofing 12) Reverse Engineering
    6) Maintaining Access 13) Hardware Hacking
    7) Reporting Tools 14) Extra
    0) All
    Select a category or press (0) to install all Kali linux tools .

    按0全部安装

  2. 第三步:移除kali的源

目前最新的版本已经在退出时自动移除kali源了,所以不需要再手动去1里清除。

最好不要再手动清除了,因为这样做之后我的源就全没了,还得把/etc/apt/sources.list和/etc/apt/sources.list.d/raspi.list重新配置一遍

遇到的问题

  1. 不要再手动清除源了。。。
  1. 忽略认证警告

在安装的时候,我的系统会提示是否继续(Y/n)和未认证是否继续安装(y/N)。。。注意这里的大小写,大写说明为默认选项,也就是你直接回车等于选大写的选项,而在py文件中执行的代码如下

Code
 _________
| 2 floor |
\033[1;36m**************************** All Categories *****************************\033[1;m
1) Information Gathering 8) Exploitation Tools
2) Vulnerability Analysis 9) Forensics Tools
3) Wireless Attacks 10) Stress Testing
4) Web Applications 11) Password Attacks
5) Sniffing & Spoofing 12) Reverse Engineering
6) Maintaining Access 13) Hardware Hacking
7) Reporting Tools 14) Extra

0) All
plus) Remove all kali tool
''')
print ("\033[1;32mSelect a category or press (0) to install all Kali linux tools .\n\033[1;m")

option1 = raw_input("\033[1;36mkat > \033[1;m")
if option1 == "back":
inicio1()

elif option1 == "gohome":
inicio1()

elif option1 == "plus":
kalitool = ["acccheck", "ace-voip", "amap", "automater", "braa", "casefile", "cdpsnarf", "cisco-torch", "cookie-cadger", "copy-router-config", "dmitry", "dnmap", "dnsenum", "dnsmap", "dnsrecon", "dnstracer", "dnswalk", "dotdotpwn", "enum4linux", "enumiax", "exploitdb", "fierce", "firewalk", "fragroute", "fragrouter", "ghost-phisher", "golismero", "goofile", "lbd", "maltego-teeth", "masscan", "miranda", "nmap", "parsero", "recon-ng", "smtp-user-enum", "snmpcheck", "sslcaudit", "sslsplit", "sslyze", "theharvester", "tlssled", "twofi", "urlcrazy", "wol-e", "intrace", "hping3", "bbqsql", "bed", "cisco-auditing-tool", "cisco-global-exploiter", "cisco-ocs", "doona", "greenbone-security-assistant", "hexorbase", "jsql", "lynis", "openvas-cli", "openvas-manager", "openvas-scanner", "oscanner", "powerfuzzer", "sfuzz", "sidguesser", "siparmyknife", "sqlmap", "sqlninja", "sqlsus", "tnscmd10g", "unix-privesc-check", "yersinia", "aircrack-ng", "asleap", "bluelog", "blueranger", "bluesnarfer", "bully", "cowpatty", "crackle", "eapmd5pass", "fern-wifi-cracker", "giskismet", "gqrx", "kalibrate-rtl", "killerbee", "kismet", "mdk3", "mfcuk", "mfoc", "mfterm", "multimon-ng", "pixiewps", "reaver", "redfang", "spooftooph", "wifi-honey", "wifitap", "wifite", "apache-users", "arachni", "blindelephant", "burpsuite", "cutycapt", "davtest", "deblaze", "dirb", "dirbuster", "fimap", "funkload", "grabber", "jboss-autopwn", "joomscan", "padbuster", "paros", "plecost", "proxystrike", "skipfish", "ua-tester", "uniscan", "vega", "w3af", "webscarab", "websploit", "wfuzz", "wpscan", "xsser", "zaproxy", "dnschef", "fiked", "hamster-sidejack", "hexinject", "iaxflood", "inviteflood", "ismtp", "mitmproxy", "ohrwurm", "protos-sip", "rebind", "responder", "rtpbreak", "rtpinsertsound", "rtpmixsound", "sctpscan", "sipp", "sipvicious", "sniffjoke", "sslstrip", "thc-ipv6", "voiphopper", "wireshark", "xspy", "cryptcat", "cymothoa", "dbd", "dns2tcp", "http-tunnel", "httptunnel", "intersect", "nishang", "polenum", "powersploit", "pwnat", "ridenum", "sbd", "u3-pwn", "webshells", "weevely", "dos2unix", "dradis", "keepnote", "magictree", "metagoofil", "nipper-ng", "pipal", "armitage", "backdoor-factory", "linux-exploit-suggester", "set", "shellnoob", "beef-xss", "binwalk", "bulk-extractor", "chntpw", "cuckoo", "dc3dd", "ddrescue", "dumpzilla", "extundelete", "foremost", "galleta", "guymager", "iphone-backup-analyzer", "p0f", "pdf-parser", "pdfid", "pdgmail", "peepdf", "volatility", "xplico", "dhcpig", "ipv6-toolkit", "rtpflood", "slowhttptest", "t50", "termineter", "thc-ssl-dos", "cewl", "cmospwd", "creddump", "crunch", "findmyhash", "gpp-decrypt", "hash-identifier", "john", "johnny", "keimpx", "maskprocessor", "multiforcer", "ncrack", "oclgausscrack", "pack", "patator", "rainbowcrack", "rcracki-mt", "rsmangler", "statsprocessor", "thc-pptp-bruter", "truecrack", "wordlists", "apktool", "dex2jar", "python-distorm3", "edb-debugger", "jad", "javasnoop", "jd", "ollydbg", "smali", "valgrind", "yara", "android-sdk", "arduino", "sakis3g"]
for k_remove in kalitool:
print ("\033[1;36mRemove\033[1;m \033[1;32m%s\033[1;m" % k_remove)
cmd = os.system("apt-get -y autoremove %s" % k_remove)

elif option1 == "0":
kalitool = ["acccheck", "ace-voip", "amap", "automater", "braa", "casefile", "cdpsnarf", "cisco-torch", "cookie-cadger", "copy-router-config", "dmitry", "dnmap", "dnsenum", "dnsmap", "dnsrecon", "dnstracer", "dnswalk", "dotdotpwn", "enum4linux", "enumiax", "exploitdb", "fierce", "firewalk", "fragroute", "fragrouter", "ghost-phisher", "golismero", "goofile", "lbd", "maltego-teeth", "masscan", "miranda", "nmap", "parsero", "recon-ng", "smtp-user-enum", "snmpcheck", "sslcaudit", "sslsplit", "sslyze", "theharvester", "tlssled", "twofi", "urlcrazy", "wol-e", "intrace", "hping3", "bbqsql", "bed", "cisco-auditing-tool", "cisco-global-exploiter", "cisco-ocs", "doona", "greenbone-security-assistant", "hexorbase", "jsql", "lynis", "openvas-cli", "openvas-manager", "openvas-scanner", "oscanner", "powerfuzzer", "sfuzz", "sidguesser", "siparmyknife", "sqlmap", "sqlninja", "sqlsus", "tnscmd10g", "unix-privesc-check", "yersinia", "aircrack-ng", "asleap", "bluelog", "blueranger", "bluesnarfer", "bully", "cowpatty", "crackle", "eapmd5pass", "fern-wifi-cracker", "giskismet", "gqrx", "kalibrate-rtl", "killerbee", "kismet", "mdk3", "mfcuk", "mfoc", "mfterm", "multimon-ng", "pixiewps", "reaver", "redfang", "spooftooph", "wifi-honey", "wifitap", "wifite", "apache-users", "arachni", "blindelephant", "burpsuite", "cutycapt", "davtest", "deblaze", "dirb", "dirbuster", "fimap", "funkload", "grabber", "jboss-autopwn", "joomscan", "padbuster", "paros", "plecost", "proxystrike", "skipfish", "ua-tester", "uniscan", "vega", "w3af", "webscarab", "websploit", "wfuzz", "wpscan", "xsser", "zaproxy", "dnschef", "fiked", "hamster-sidejack", "hexinject", "iaxflood", "inviteflood", "ismtp", "mitmproxy", "ohrwurm", "protos-sip", "rebind", "responder", "rtpbreak", "rtpinsertsound", "rtpmixsound", "sctpscan", "sipp", "sipvicious", "sniffjoke", "sslstrip", "thc-ipv6", "voiphopper", "wireshark", "xspy", "cryptcat", "cymothoa", "dbd", "dns2tcp", "http-tunnel", "httptunnel", "intersect", "nishang", "polenum", "powersploit", "pwnat", "ridenum", "sbd", "u3-pwn", "webshells", "weevely", "dos2unix", "dradis", "keepnote", "magictree", "metagoofil", "nipper-ng", "pipal", "armitage", "backdoor-factory", "linux-exploit-suggester", "set", "shellnoob", "beef-xss", "binwalk", "bulk-extractor", "chntpw", "cuckoo", "dc3dd", "ddrescue", "dumpzilla", "extundelete", "foremost", "galleta", "guymager", "iphone-backup-analyzer", "p0f", "pdf-parser", "pdfid", "pdgmail", "peepdf", "volatility", "xplico", "dhcpig", "ipv6-toolkit", "rtpflood", "slowhttptest", "t50", "termineter", "thc-ssl-dos", "cewl", "cmospwd", "creddump", "crunch", "findmyhash", "gpp-decrypt", "hash-identifier", "john", "johnny", "keimpx", "maskprocessor", "multiforcer", "ncrack", "oclgausscrack", "pack", "patator", "rainbowcrack", "rcracki-mt", "rsmangler", "statsprocessor", "thc-pptp-bruter", "truecrack", "wordlists", "apktool", "dex2jar", "python-distorm3", "edb-debugger", "jad", "javasnoop", "jd", "ollydbg", "smali", "valgrind", "yara", "android-sdk", "arduino", "sakis3g"]
kt_count = 1
kt_len = len(kalitool)
for kt in kalitool:
print ("\033[1;36mInstall\033[1;m \033[1;32m%s %d / %d\033[1;m" % (kt, kt_count, kt_len))
cmd = os.system("apt-get -f -y install %s" % kt)
if not cmd:
print ("The system return \033[1;31m%d\033[1;m" % cmd)
kt_count += 1
cmd = os.system("wget http://www.morningstarsecurity.com/downloads/bing-ip2hosts-0.4.tar.gz && tar -xzvf bing-ip2hosts-0.4.tar.gz && cp bing-ip2hosts-0.4/bing-ip2hosts /usr/local/bin/")

while option1 == "1":
print ('''

就拿0,也就是全部安装来看,其他也一样的
按0后执行的语句为
cmd = os.system("apt-get -f -y install %s" % kt)
可以看到,这里使用的是-y,而-y的意思是:

使用-y选项会在安装过程中使用默认设置,如果默认设置为N,那么就会选择N,而不会选择y。并没有让apt-get一直选择y的选项。

所以我如果直接安装就相当于自动选择继续(Y)后选择了程序未认证,不安装(N),也就不可能装上,当然如果你一个一个安装就可以自己选择,但如果我们想要大批量安装,就需要一个自动化的命令,所以我们需要修改一开始安装的位置和/usr/bin里的katoolin4china.py文件
我的位置如下

Code
vi /home/pi/katoolin4china/katoolin4china.py

vi /usr/bin/katoolin4china.py

修改上面那条语句,在%s后加上 –allow-unauthenticated,记得s后加空格
cmd = os.system("apt-get -f -y install %s --allow-unauthenticated" % kt)

这样就可以了

  1. 在安装过程中手动终止后再次安装出现错误

我在调试上面的代码时就终止了几次,出现了以下错误:

目标。。。在。。。和。。。中被配置了多次

这是因为你的源被软件添加多次,我们需要把源文件中所有kali’源删掉

还遇到一种错误

Code
E: 无法获得锁 /var/cache/apt/archives/lock - open (11: 资源暂时不可用)
E: 无法对目录 /var/cache/apt/archives/ 加锁

这时我们要删除锁

Code
sudo rm /var/cache/apt/archives/lock
sudo rm /var/lib/dpkg/lock

就行了

文章作者: kabeor
文章链接: https://kabeor.github.io/%E6%A0%91%E8%8E%93%E6%B4%BE%E7%B3%BB%E7%BB%9F%EF%BC%88%E5%9F%BA%E4%BA%8EDebian%EF%BC%89%E5%AE%89%E8%A3%85kali%E5%B7%A5%E5%85%B7/
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 K's House

评论