Kali 与 Windows 工作环境配置
目录
1 Kali 工作环境配置
Windows 中用 usbwriter 烧录 Kali 镜像。
Kali Linux前身是 BT5,底层使用的是 Debian,当前 2019.1 版本滚动更新(rolling)直接从官方获取更新信息,在这之前都是重新下载官方发行版。
Kali 内置大量安全工具,可避开独自安装过程中的坑。
在 /etc/apt/sources.list 文件中添加更新源:
# kali 镜像源
deb https://mirrors.ustc.edu.cn/kali kali-rolling main non-free non-free-firmware contrib
deb-src https://mirrors.ustc.edu.cn/kali kali-rolling main non-free non-free-firmware contrib来获取官方源的内容存到系统工具的数据库中作为索引,顺带更新软件。
apt-get update && apt-get upgrade不推荐用非官方源,其次别用 apt-get upgrade ,避免后续使用工具可能会遇到新问题,但经过长时间测试后没遇到过问题,这里所说的问题应该是老旧软件存在依赖导致的无法运行。
常用软件安装
创建快捷方式 /usr/share/applications/typora.desktop
[Desktop Entry]
Encoding=UTF-8
Type=Application
Terminal=false
Exec=/opt/Typora-linux-x64/Typora --no-sandbox
Icon=/opt/Typora-linux-x64/resources/app/asserts/icon/icon_512x512.png
Name=TyporaChrome
编辑 /opt/google/chrome/google-chrome,添加 --no-sandbox 即可启动。
基本软件:apt install keepassxc terminator flameshot ipcalc firefox-esr-l10n-zh-cn teamviewer
Shell背景颜色 #FDFCE5,改变终端命令提示符颜色为黑色。
flameshot 截图软件快捷键调整

用 pip 装 Shadowsocks
dpkg -i pack_name
安装成功桌面上会有三个快捷方式无法打开,右键点击 Allow Launching(允许启动)就能显示正常。

flash插件安装-firefox浏览器
安装的需要仔细查看README.txt中install说明,安装完成后就可以看视频,不同浏览器可能要安装的版本不同,安装完成后在线测试有没有安装成功。
字体设置
把下载的字体 xx.tff 复制到 /usr/share/fonts 目录中就能使用,或者双击安装。
我个人用的是 Andale moon
Firefox 浏览器设置
在 uri 中输入 about:config,在里面找到:network.captive-portal-service.enadbled,双击或enter
改为 False。如果全部输入找不到就输入一部分关键词。
改这个的原因是 Burp 在抓包时,浏览器隔一段时间会向 firefox 某个网址发送GET请求,不方便区分想抓的包。
Java 版本调整 update-alternatives --config java 选择为 /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java,星号代表你当前选择的版本。调整这个还是因为 Burp,版本过高可能会出现莫名的错误。

对 Burp 创建快捷方式/usr/share/applications/burp.desktop
[Desktop Entry]
Encoding=UTF-8
Type=Application
Terminal=false
Exec=java -Xbootclasspath/p:/root/burpsuite/burp-loader-keygen.jar -jar /root/burpsuite/burpsuite_pro_v1.7.31.jar
Icon=kali-burpsuite.png
Name=burp1添加到收藏夹

快速开启文件共享
用 Python 在当前系统开启一个端口当做 HTTP 服务器,默认开启 8000 端口。
Python2
python -m SimpleHTTPServer [port]Python3
python3 -m http.server [port]软件包管理工具基操
dpkg
dpkg -i # -i 是 install
dpkg -i package.deb # 安装包
dpkg -r package # 删除包
dpkg -P package # 删除包,包括配置文件
dpkg -L package # 列出与该包关联的文件
dpkg -l package # 显示该包的版本,不加 package_name 就显示所有已经安装的包。 apt-get
使用 apt-get 前,需要参考官方文档配置 /etc/apt/source.list
https://www.kali.org/docs/general-use/updating-kali/
https://www.kali.org/docs/general-use/kali-linux-sources-list-repositories/
如果出现
[sudo] password for kali:
Get:1 http://kali.download/kali kali-last-snapshot InRelease [30.6 kB]
Err:1 http://kali.download/kali kali-last-snapshot InRelease
The following signatures were invalid: EXPKEYSIG ED444FF07D8D0BF6 Kali Linux Repository <devel@kali.org>
Reading package lists... Done
W: GPG error: http://kali.download/kali kali-last-snapshot InRelease: The following signatures were invalid: EXPKEYSIG ED444FF07D8D0BF6 Kali Linux Repository <devel@kali.org>
E: The repository 'http://http.kali.org/kali kali-last-snapshot InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.需要添加 [trusted=yes] 信任此源。
deb [trusted=yes] http://http.kali.org/kali kali-last-snapshot main contrib non-freeapt-get 中有一部分命令与 apt 相同,apt 在使用显示方面更加好看。
apt-cache search package # 搜索软件包
apt-cache show package # 获取包的相关信息,如说明、大小、版本等
apt-get install package # 安装包
apt-get install package --reinstall # 重新安装包
apt-get -f install package # 解决 dpkg -i 安装失败需要依赖的包,-f 等同于 --fix-broken。
apt-get remove packagename # 卸载一个已安装的软件包,保留配置文件
apt-get remove –-purge packagename # 卸载一个已安装的软件包,包括删除配置文件
apt-get update # 更新源
apt-get upgrade # 更新已安装的包,遇到包 a 遇到依赖冲突,那么 包 a 就不升级。
更新一个包时可能需要新的依赖关系,其他包可能也需要这个依赖,这个时候要是更新依赖可能会导致其他包无法正常使用。
apt-get dist-upgrade # 会自动处理包依赖关系,遇到冲突会自动尝试删除或者升级包,比较激进。另一个是会升级系统。
apt full-upgrade # 先删除已安装的包在重新安装新版本包+更新系统。这条和 apt-get dist-upgrade一致
apt-get autoclean # 自动清理无用的包2 Windows 工作环境配置
终端配置
默认终端(PowerShell/CMD)字体配置:使用 Microsoft YaHei Mono 字体看着就挺舒服。
cmder 终端没有 wget?使用 scoop 安装就好了。
- 需要把 Ctrl + w 关闭标签页改为 Ctrl + Shirt + w,避免跟 bash 向前删除单词快捷操作冲突。
- 把 Cmder.exe 改为 f.exe 并加入环境变量用于快速启动。
%HOMEPATH%进入 home 目录向 .bashrc 添加cd ~就可以打开 Shell 回到根目录,不用每次从安装中目录切换到 home 目录。
Windows Terminal,快速启动 Win + R 输入 wt ,也就是 Windows Terminal 缩写。
就在配置文件添加了些字体大小、毛玻璃、主题样式的调整。
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"defaultProfile": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
// You can add more global application settings here.
// To learn more about global settings, visit https://aka.ms/terminal-global-settings
// If enabled, selections are automatically copied to your clipboard.
"copyOnSelect": false,
// If enabled, formatted data is also copied to your clipboard
"copyFormatting": false,
// A profile specifies a command to execute paired with information about how it should look and feel.
// Each one of them will appear in the 'New Tab' dropdown,
// and can be invoked from the commandline with `wt.exe -p xxx`
// To learn more about profiles, visit https://aka.ms/terminal-profile-settings
"profiles":
{
"defaults":
{
// Put settings here that you want to apply to all profiles.
"fontSize": 11,
"useAcrylic": true,
"acrylicOpacity": 0.90,
"scrollbarState": "visible"
},
"list":
[
{
// Make changes here to the powershell.exe profile.
"guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
"name": "Windows PowerShell",
"commandline": "powershell.exe",
"hidden": false
},
{
// Make changes here to the cmd.exe profile.
"guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
"name": "命令提示符",
"commandline": "cmd.exe",
"hidden": false
},
{
"guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}",
"hidden": false,
"name": "Azure Cloud Shell",
"source": "Windows.Terminal.Azure"
}
]
},
// Add custom color schemes to this array.
// To learn more about color schemes, visit https://aka.ms/terminal-color-schemes
"schemes": [],
// Add custom actions and keybindings to this array.
// To unbind a key combination from your defaults.json, set the command to "unbound".
// To learn more about actions and keybindings, visit https://aka.ms/terminal-keybindings
"actions":
[
// Copy and paste are bound to Ctrl+Shift+C and Ctrl+Shift+V in your defaults.json.
// These two lines additionally bind them to Ctrl+C and Ctrl+V.
// To learn more about selection, visit https://aka.ms/terminal-selection
{ "command": {"action": "copy", "singleLine": false }, "keys": "ctrl+c" },
{ "command": "paste", "keys": "ctrl+v" },
// Press Ctrl+Shift+F to open the search box
{ "command": "find", "keys": "ctrl+shift+e" },
// Press Alt+Shift+D to open a new pane.
// - "split": "auto" makes this pane open in the direction that provides the most surface area.
// - "splitMode": "duplicate" makes the new pane use the focused pane's profile.
// To learn more about panes, visit https://aka.ms/terminal-panes
{ "command": { "action": "splitPane", "split": "auto", "splitMode": "duplicate" }, "keys": "alt+shift+d" },
],
"theme": "dark",
"experimental.rendering.forceFullRepaint": true
}随着终端不断发展,已经有了图形化配置无需使用 json 啦 2021.12.2。
软件管理
scoop 可安装大多数需要的软件,或者用 WinGet(Windows 11 自带)、Chocolatey 也行。
默认 mainfest 仓库软件优先,得安装个扩展仓库,里面有更多软件可供选择。
scoop bucket add extras这里记录一些我常用的软件。
scoop install googlechrome firefox cmder snipaste everything typora wget curl git keepassxc listary bandizip screentogif notepad3其余一些工具手动安装:
- AdGuard
- 网易有道词典
- pixpin,一款支持 OCR、GIF 录制、截图的软件。可以替代 Snipaste。
- 微信输入法。主要是复制功能可以同步到手机上这个功能比较使用,只用自然码双拼就用系统自带的微软输入法就好。
- ......
Firefox 插件:
- Wappalyzer
- HackBar
- Cookie-Editor
- SwitchyOmega
Chrome 插件:
- Charset
- Video Speed Controller
- SwitchyOmega。Chrome 浏览器扩展更新到 Manifest V3,后续官方会慢慢的把以前用 Manifest V2 写的扩展给禁用,有些大佬就把 SwitchyOmega 迁移到最新的 V3 版本,项目名是 ZeroOmega。有了插件还可以在自动代理读取 gfwlist 规则,达到自动切换的效果。PS:SmartProxy 也可以试一试,同样是 V3 插件。
Tampermonkey
- 懒人工具箱
- 沉浸式翻译
- SingleFile
- V2EX Polish
现在 Windows 11 自带 winget 包管理器,非常方便,由于没有重装环境的需求,等换电脑再重写本小节内容 2023.11.13
最近更新:
发布时间: