内网工作组信息收集

本机信息收集

  • 查询网络配置-ipconfig/all
  • 查询用户列表
  • 查询进程列表
  • 查询操作系统及安装软件版本信息
  • 查询端口列表
  • 查询补丁列表
  • 查询本机共享
  • 查询防火墙配置
  • 查询并开启远程连接服务

查询网络配置-ipconfig/all

查询用户列表

net user        查看本机用户列表

net localgroup administratots   本机管理员

query user || qwinsta     查看当前用户

查询进程列表

tasklist /v

wmic process list brief

查询操作系统及安装软件版本信息 

获取操作系统及软件版本信息

systeminfo | findstr /B /C:"OS Name" /C:"OS Version"

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.installed0n

查询本机共享

net share

net share \\hostname

wmic share get name,path,status

查询防火墙配置

netsh firewall show config

关闭防火墙

windows 2003系统之前版本

netsh firewall set opmode

 之后版本

netsh advfirewall set allprofiles state off

允许指定程序连入

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"

允许3389放行

netsh advfirewall firewall add rule name="remote desktop" protocol=TCP dir=in  localport=3389 action=allow"

查询并开启远程连接服务

查看远程连接端口

REG query HKLM\SYSTEM\CurrentControlSet\Control\Terminal" "Server\WinStations\RDP-Tcp /v PortNumber

这条命令是查看远程桌面连接所开的端口是多少 一般默认显示是0xd3d 也就是3389

# 1.设置远程桌面端口(可以不用输,直接第二步,默认开启3389)在2012上测试
reg add "HKLM\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp" /t REG_DWORD /v portnumber /d 3389 /f
 
# 2.开启远程桌面
wmic RDTOGGLE WHERE ServerName='%COMPUTERNAME%' call SetAllowTSConnections 1
 
#检查端口状态
netstat -an|find "3389"
 
#关闭远程桌面
wmic RDTOGGLE WHERE ServerName='%COMPUTERNAME%' call SetAllowTSConnections 0

查询当前权限

whoami /all 获取域SID

net user 

net user xx /domain 查询指定账户的详细信息

hostname

猜你喜欢

转载自blog.csdn.net/y995zq/article/details/130406117
今日推荐