新 kali 配置
# 创建root账户:sudo passwd root
# 安装渗透所有黑客工具:sudo apt-get -y install kali-linux-everything
# 修改源地址:
cat /etc/apt/sources.list
或
leafpad /etc/apt/sources.list
# 国内镜像源:
#中科大
deb http://mirrors.ustc.edu.cn/kali kali-rolling main non-free contrib
deb-src http://mirrors.ustc.edu.cn/kali kali-rolling main non-free contrib
#阿里云
deb http://mirrors.aliyun.com/kali kali-rolling main non-free contrib
deb-src http://mirrors.aliyun.com/kali kali-rolling main non-free contrib
#清华大学
deb http://mirrors.tuna.tsinghua.edu.cn/kali kali-rolling main contrib non-free
deb-src https://mirrors.tuna.tsinghua.edu.cn/kali kali-rolling main contrib non-free
#浙大
deb http://mirrors.zju.edu.cn/kali kali-rolling main contrib non-free
deb-src http://mirrors.zju.edu.cn/kali kali-rolling main contrib non-free
#东软大学
deb http://mirrors.neusoft.edu.cn/kali kali-rolling/main non-free contrib
deb-src http://mirrors.neusoft.edu.cn/kali kali-rolling/main non-free contrib
#官方源
deb http://http.kali.org/kali kali-rolling main non-free contrib
deb-src http://http.kali.org/kali kali-rolling main non-free contrib
deb http://mirrors.163.com/debian/ jessie main non-free contrib
deb http://mirrors.163.com/debian/ jessie-updates main non-free contrib
deb http://mirrors.163.com/debian/ jessie-backports main non-free contrib
deb-src http://mirrors.163.com/debian/ jessie main non-free contrib
deb-src http://mirrors.163.com/debian/ jessie-updates main non-free contrib
deb-src http://mirrors.163.com/debian/ jessie-backports main non-free contrib
deb http://mirrors.163.com/debian-security/ jessie/updates main non-free contrib
deb-src http://mirrors.163.com/debian-security/ jessie/updates main non-free contrib
apt-get update && apt-get upgrade # 取回更新的软件包列表信息进行一次升级
apt-get clean # 删除已经下载的安装包
reboot #重启
设置SSH,使其能够远程连接XShell
打开SSH配置文件:
vim /etc/ssh/sshd_config
修改两个地方:
重启SSH服务:/etc/init.d/ssh restart
开启ssh服务:service ssh start
添加开机启动SSH服务:update-rc.d ssh enable
关闭开机启动SSH服务:update-rc.d ssh disable
XShell传输文件:
rz #Windows向kali传输。要传到哪里先root模式进入当前文件夹,rz选择传输文件
rz -y # 如果覆盖原文件,执行:
sz {文件} #下载文件,执行;
Alt+P #打开属性框。打开【文件传输】,这里可以调整传输的一些属性。下载文件,可以执行下载目录,下载文件时就不会再询问。上传文件,可以直接拖动文件到xshell上传,很方便。

kali - MySQL数据库配置:
########### kali 是默认安装MySQL的,只是需要我们配置一下:##################
# 启动MySQL:
service mysql start
# 初始化密码:
mysql_secure_installation
# 出现这个的时候,一路 Y 就可以了,中途需要设置密码
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
In order to log into MariaDB to secure it, we'll need the current
password for the root user. If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.
Enter current password for root (enter for none):
OK, successfully used password, moving on...
Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.
You already have a root password set, so you can safely answer 'n'.
Change the root password? [Y/n] y
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
... Success!
By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment.
Remove anonymous users? [Y/n] n
... skipping.
Normally, root should only be allowed to connect from 'localhost'. This
ensures that someone cannot guess at the root password from the network.
Disallow root login remotely? [Y/n] n
... skipping.
By default, MariaDB comes with a database named 'test' that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment.
Remove test database and access to it? [Y/n] n
... skipping.
Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.
Reload privilege tables now? [Y/n] y
... Success!
Cleaning up...
All done! If you've completed all of the above steps, your MariaDB
installation should now be secure.
Thanks for using MariaDB!
# 出现上述这个 :Thanks for using MariaDB! 则说明配置成功!
# 以root用户登录,密码为root(刚才自己设置的!)
mysql -uroot -proot 以root用户登录,密码为root
# 登录成功:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 42
Server version: 10.5.11-MariaDB-1 Debian 11
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]>
拓展:错误总结
# 安装Python第三方库:
以mdeditor举例:先去官网搜索下载命令,然后用pip指令进行下载
pip install django-mdeditor
# 部署Gr33kLibrary报错信息处理:
错误一:
django.core.exceptions.ImproperlyConfigured: mysqlclient 1.3.13 or newer is required; you have 0.9.3.
解决办法:安装pymysql,只需要降低django的版本就可以了
pip install pymysql
pip install django==2.1.4
错误二:
django.db.utils.InternalError: (1698, "Access denied for user 'root'@'localhost'")
解决办法:
kali tools 工具列表:
kali tools 工具列表 enum4 linux :用于检索windos 和 Samba 主机中的数据。 haping3 : masscan :世界上最快的端口扫描工具、先用masscan 扫描资产、再用namp细扫。 nikto :web服务器扫描工具、速度极快、类似于网络爬虫进行fuzz。可以通过wirshark 进行追踪数据流分析。 nmap:可以用来爆破、fuzz等 Sublist3r :子域名枚举工具、需要链接外网Google的、新版kali目前不预装、可以自行下载、 exploitdb :可以去查询POC linux exploit Suggester :GitHub可以进行搜索 beef :XSS的利用工具 Armitage :后渗透工具、msf图形化工具。适合小白学习使用 backdoor- factory(ka1i自带不好用) routersploit:类似msf、网络服务基本的msf框架、针对路由器、防护墙的 msf setoolkit:社会工程学框架、非常屌丝、社会工程学欺骗手段、也可以拿shell。不预装。 sqlmap: Burp Suite WPScan: wfuzz:神器结合好的字典、能fuzz一切。fuzz 就是模糊测试就是蒙! websploit:中间人的框架、不预装 owasp zap w3af Gobuster recon-ng:研究研究其实很不错、信息搜集框架 netdiscover :查网络的 shodan what cms :查网站指纹信息的 DIRB:目录扫描工具、类似于御剑。 curl:这也是个神器、需要详细了解、最简单的web poc 工具。没有之一。 John the Ripper :破解密码的 wordlists:字典 Nishang dntcp Webshells :构建webshell工具。 Hydra:爆破工具 apktool :APK工具 impackt locate :
文章转载自在下小黄,如果涉嫌侵权,请发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。




