搭建Kali Linux 基础环境

        最近想看看渗透测试的相关内容,网上找了一个kali Linux的PDF文档,参考着搭建了一个基础的环境。

        首先是下载kali Linux,最简单的方法是直接下载VM的版本即可,下载地址 https://www.kali.org/downloads/ ,通过VM打开,开启后登录(默认的用户名密码是root/toor),因为直接通过GUI来操作比较麻烦,可以在Windows上安装一个SSH的客户端,比如 SecureCRT, 默认情况下Kali Linux 是没有开启SSH服务的,需要修改配置文件并手动开启,修改过程如下:

        1、通过 vi /etc/ssh/sshd_config ” 打开配置文件

       2、找到“ #PasswordAuthentication yes ” ,注释掉#

      3、找到“ PermitRootLogin ”,将它后边内容删掉,改为“ yes ”,保存该文件

      4、输入命令“ service ssh restart ”重启ssh服务

通过如上几步,即可通过SSH服务来远程访问,默认端口是22

-------------------------------------------------------------------------------------------------------

如下是《黑客秘籍》中搭建kali linux 环境的一些说明:

 

The Hacker Playbook 2
  http://www.amazon.com/dp/1512214566/
   
  Since this book is based off of the Kali Linux platform, you can download the Kali Linux distro from: http://www.kali.org/downloads/. I highly recommend you download the VMware image (https://www.offensive-security.com/kali-linux-vmware-arm-image-download/) and download Virtual Player/VirtualBox. Remember that it will be a gz-compressed and tar archived file, so make sure to extract them first and load the vmx file.
   
  Once Your Kali VM is Up and Running
  ● Log in with the username root and the default password toor
  ● Open a terminal
  ● Change the password
  ○ passwd
  ● Update the image
  ○ apt-get update
  ○ apt-get dist-upgrade
  ● Setup Metasploit database
  ○ service postgresql start
  ● Make postgresql database start on boot
  ○ update-rc.d postgresql enable
  ● Start and stop the Metasploit service (this will setup the database.yml file for you)
  ○ service metasploit start
  ○ service metasploit stop
  ● Install gedit
  ○ apt-get install gedit
  ● Change the hostname - Many network admins look for systems named Kali in logs like DHCP. It is best to follow the naming standard used by the company you are testing
  ○ gedit /etc/hostname
  ■ Change the hostname (replace kali) and save
  ○ gedit /etc/hosts
  ■ Change the hostname (replace kali) and save
  ○ reboot
  ● *Optional for Metasploit - Enable Logging
  ○ I list this as optional since logs get pretty big, but you have the ability to log every command and result from Metasploit’s Command Line Interface (CLI). This becomes very useful for bulk attack/queries or if your client requires these logs. *If this is a fresh image, type msfconsole first and exit before configuring logging to create the .msf4 folder.
  ○ From a command prompt, type:
  • 1
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值