首先需要在windows下安装kali子系统。打开windows设置,选择更新和安全 ====> 开发者选项,选择开发人员模式。
接着打开控制面板 ====> 程序 ====> 启用或关闭Windows功能,勾选适用于Linux的Windows子系统
然后打开Microsoft Store 搜索 kali 或者 ubuntu都可以
安装完成后会然你设置用户名和密码,设置完成之后就可以使用了。接着更新源就可以了。如果安装的是ubuntu的子系统最好更换一下kali 的源
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get dist-upgrade -y
sudo apt-get clean
然后一键安装msf,哈哈哈哈!
curl https://raw.githubusercontent.com/rapid7/metasploit-omnibus/master/config/templates/metasploit-framework-wrappers/msfupdate.erb > msfinstall && \
chmod 755 msfinstall && \
./msfinstall
安装好之后就可以使用msf啦!,但是他会显示数据库没有,那就再安装一下数据库
sudo apt-get install postgresql
安装好之后输入用户名密码就OK了
接着打开msf,一切都很顺利
再实验的时候主要要把杀软给关闭,不然payload会被拦截。
这里我用的终端是windows之前新出的终端!可以在Microsoft Store 下载
下载之后就可以用了,在终端上面打上 kali 或者ubuntu就可以进入子系统,或者在选项栏里进入
这里我也配置了Cmder,这个配置文件确实挺难搞哈哈哈,我就在网上找了一个大神的配置自己改了一下。B站大佬有视频讲解
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"defaultProfile": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
"confirmCloseAllTabs" :false, //设置关闭多个tab时不提示
"initialCols" : 120, //默认宽度
"initialRows" : 30, //默认长度
"rowsToScroll" : "system", //鼠标一次滚动行数,"system"为系统值
"requestedTheme" :"system", //主题,默认为"system"
"profiles":
{
"defaults":
{
"padding": "8, 8, 8, 16",
"snapOnInput" : true
// Put settings here that you want to apply to all profiles
},
"list":
[
{
//----------PowerShell------------
// Make changes here to the powershell.exe profile
"guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
"name": "Windows PowerShell",
"commandline": "powershell.exe",
"hidden": false,
"fontFace" : "Sarasa Mono T SC", //字体 等距更纱黑体 T SC 推荐这款字体,不过这个字体需要自行去GitHub下载,
"fontSize" : 12, //字体大小
"foreground" : "#FFC0CB", //字体颜色
"cursorColor" : "#fbff00", //光标颜色
"cursorShape" : "bar", //光标类型
//设置背景
"acrylicOpacity": 0.7, //背景毛玻璃不透明度
"useAcrylic": true, //背景使用毛玻璃效果
"background": "#1f3570", //背景颜色
"backgroundImage": "", //背景图片 请自行更改
"backgroundImageOpacity": 0.8, //背景图片透明度
"backgroundImageStretchMode": "uniformToFill" //背景图片拉伸效果
},
{
//-----------CMD-------------
// Make changes here to the cmd.exe profile
"guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
"name": "cmd",
"commandline": "cmd.exe",
"hidden": false,
"fontFace" : "Sarasa Mono T SC", //字体 等距更纱黑体 T SC
"fontSize" : 12, //字体大小
"foreground" : "#ffffff", //字体颜色
"cursorColor" : "#4495ff", //光标颜色
"cursorShape" : "bar", //光标类型
"snapOnInput" : true,
//设置背景
"acrylicOpacity": 0.7, //背景毛玻璃不透明度
"useAcrylic": true, //背景使用毛玻璃效果
"background": "#0c0c0c" //背景颜色
//"backgroundImage": ", //背景图片 请自行更改
//"backgroundImageOpacity": 0.5, //背景图片透明度
//"backgroundImageStretchMode": "Fill" //背景图片拉伸效果
},
{
"commandline" : "cmd.exe /k E:\\cmder\\vendor\\init.bat", //up主自己添加的Cmder
"hidden": false,
"name": "Cmder",
"icon": "E:\\cmder\\icons\\cmder.ico",
"fontFace" : "Sarasa Mono T SC", //字体 等距更纱黑体 T SC
"fontSize" : 12, //字体大小
"foreground" : "#ffffff", //字体颜色
"cursorColor" : "#4495ff", //光标颜色
"cursorShape" : "bar", //光标类型
"snapOnInput" : true,
//设置背景
"acrylicOpacity": 0.5, //背景毛玻璃不透明度
"useAcrylic": true //背景使用毛玻璃效果
//"background": "#0c0c0c", //背景颜色
//"backgroundImage": "", //背景图片
//"backgroundImageOpacity": 0.5 //背景图片透明度
},
{
"guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}",
"hidden": false,
"name": "Azure Cloud Shell",
"source": "Windows.Terminal.Azure"
},
{
"guid": "{46ca431a-3a87-5fb3-83cd-11ececc031d2}",
"hidden": false,
"name": "kali-linux",
"source": "Windows.Terminal.Wsl"
}
]
},
// Add custom color schemes to this array
"schemes":
[
],
//-------------设置快捷键-------------
// Add any keybinding overrides to this array.
// To unbind a default keybinding, set the command to "unbound"
"keybindings":
[
{
"command" :"closeTab", //添加一个关闭tab的快捷方式
"keys" :
[
"esc"
]
}
]
}
最终完成效果