获取操作系统信息:
查看系统版本和补丁信息: systeminfo
识别操作系统名称及版本(英文): systeminfo | findstr /B /C:"OS Name" /c:"OS Version"
识别操作系统名称及版本(中文): systeminfo | findstr /B /C:"OS 名称" /C:"OS 版本"
识别系统体系结构: echo %PROCESSOR_ARCHITECTURE% AMD64
获取用户信息:
查看当前用户: whoami
查看计算机用户列表: net user
查看计算机用户组列表: net localgroup
查看当前登录用户: query user
查看当前用户保存的凭证: cmdkey /list
查看当前用户保存的票据凭证: klist
获取网络信息:
查看路由信息 : route print
查 看 arp : arp -A
查看ip地址和dns信息: ipconfig /all
查看防火墙规则: netsh firewall show config 查看当前防火墙状态: netsh firewall show state 查看系统开放端口: netstat -ano
获取应用程序及服务信息:
查看计划任务: schtasks /query /fo LIST /v
查看安装驱动: driverquery
查看安装程序和版本信息: wmic product list brief
查看服务: wmic service list brief
查看进程: wmic process list brief
查看启动程序信息: wmic startup list brief
查看3389端口: for /f "tokens=2" %i in ('tasklist /FI "SERVICES eq TermService" /NH') do netstat -ano | findstr %i | findstr LISTENING
Win设置终端代理: set http_proxy=http://127.0.0.1:7890 & set https_proxy=http://127.0.0.1:7890
查看.msi程序的执行权限: reg query HKCU\SOFTWARE\Policies\Microsoft\Windows\Installer /v AlwaysInstallElevated reg query HKLM\SOFTWARE\Policies\Microsoft\Windows\Installer
/v AlwaysInstallElevated
查 看 是 否 设 置 setuid 、 setgid: reg HKEY_Local_Machine\System\CurrentControlSet\Services\NfsSvr\Parameters\SafeSetUidGi dBits
查看安装补丁和时间信息: wmic qfe get Caption,Description,HotFixID,InstalledOn
查看特定补丁信息: wmic qfe get Caption,Description,HotFixID,InstalledOn | findstr
/C:"KBxxxxxxxx"
查看系统进程: tasklist /svc
列出详细进程: tasklist /V /FO CSV
获取敏感数据和目录:
搜索D盘磁盘名字为logo.jpg的文件: cd /d D:\ && dir /b /s logo.jpg
递归搜索所有名为 webtools 的目录。命令如下:dir D:\ /s /b /ad webtools
搜素C盘文件夹下后缀conf内容有password: findstr /s /i /n /d:C:\ "password" *.conf
查找密码文件或其他敏感文件: dir /b/s password.txt dir /b/s .doc dir /b/s .ppt dir /b/s
.xls dir /b/s .docx dir /b/s .xlsx dir /b/s config.* findstr /si password .xml .ini
.txt findstr /si login .xml .ini .txt
查 看 无 人 值 守 安 装 文 件 , 文 件 位 置 如 下 : C:\sysprep.inf C:\sysprep\sysprep.xml C:\Windows\Panther\Unattend\Unattended.xml C:\Windows\Panther\Unattended.xml