工作组内的信息搜集
查询当前机器的IP地址
命令:ipconfig 或者 ipconfig /all
查询操作系统和版本信息
命令:
systeminfo | findstr /B /C:"OS Name" /C:"OS Version"
或者
systeminfo| findstr /B /C:"OS 名称" /C:"OS
查询系统架构
命令:echo %PROCESSOR_ARCHITECTURE%
查询安装的软件及版本
命令:
wmic product get name,version
或者
powershell "Get-WmiObject -class win32_product | Select-Object -Property name,version"
查询本机运行的服务
命令: wmic service list brief
查询进程
命令:
tasklist
或者
wmic process list brief
查询电脑启动程序
命令:
wmic startup get command,caption
查询计划任务
命令:
schtasks /query /fo LIST /v
注意:如果出现无法加载列资源 输入:chcp 437
查询电脑开机时间
命令:
net statistics workstation
查询用户列表
命令:
net user
或者
wmic useraccount get name, SID
查询当前会话
命令:
net session(system用户权限)
查询端口信息
命令:
netstat -ano
查询补丁情况
命令:
systeminfo
或者
wmic qfe get Caption,Description,HotFixID,InstalledOn
查询共享列表
命令:
net share
或者
wmic share get name, path, status
查询路由信息
命令:
route print
查询防火墙是否开启
命令:
netsh firewall show state
关闭防火墙
命令:
Windows server 2003: netsh firewall set opmode disable
Windows server 2003之后: netsh firewall set opmode disable 或者netsh advfirewall set allprofiles state off
防火墙其他的命令
2003及之前的版本,允许指定的程序进行全部的连接: netsh firewall add allowedprogram c:\nc.exe "allownc" enable
2003之后的版本,允许指定的程序进行全部的连接: netsh advfirewall firewall add rule name="pass nc"dir=in action=allow program="C:\nc.exe"
允许指定程序退出,命令如下: netsh advfirewall firewall add rule name="Allownc" dir=out action=allow program="C: \nc.exe"
允许3389端口放行,命令如下:netsh advfirewall firewall add rule name="RemoteDesktop" protocol=TCP dir=in localport=3389 action=allow
开启/关闭远程桌面功能
命令:
开启--- REG ADD HKLM\SYSTEM\CurrentControlSet\Control\Terminal" "Server /v fDenyTSConnections /t REG_DWORD /d 00000000 /f
关闭--- REG ADD "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 11111111 /f
查询arp信息
命令:
arp -a
查询最近打开的文件
命令:
dir %APPDATA%\Microsoft\Windows\Recent
查询本地工作组
命令:
net localgroup
查询管理员信息
命令:
net localgroup administrators
查询RDP凭证
命令:
dir /a %userprofile%\AppData\Local\Microsoft\Credentials*
查询当前保存的凭证
命令:
cmdkey /list
查询杀软等信息
命令:
wmic /node:localhost /namespace:\root\securitycenter2 path antivirusproduct get displayname /format:list
本文系作者 @小白学安全 原创发布在 xbxaq.com 站点,未经许可,禁止转载!
评论