内网渗透信息收集常见命令-女黑客 - Powered by Discuz! Archiver

nvhack 发表于 2019-12-3 11:01:06

内网渗透信息收集常见命令

1,执行如下命令,可以获取当前机器是否处在内网中、有几个内网、内网段分别是多少、是否是域内网、网关 IP 地址、DNS 指向的 IP 地址等信息
ipconfig /all
2,获取系统和版本信息
systeminfo | findstr /B /I /C:"os name" /C: "OS Version"3,/B: 在一行开始匹配,/I:不区分大小写 /C:string :使用指定的字符串作为文字搜索字符串
如果是中文操作系统,输入如下命令
systeminfo | findstr /B /I /C:"os 名称" /C: "OS 版本"4,查看系统体系结构
echo %processor_architecture%5,查看安装的软件及版本、路径等
wmic product get name,version6,利用powershell命令,收集软件版本信息,具体如下
powershell "get-wmiobject -class win32_product | select-object -property name,version"7,查询本机服务信息
wmic service list brief8,查询进程列表

tasklist /vwmic process list brief
9,查看启动程序信息
wmic startup get command,caption10,查看计划任务
schtasks /query /fo list /v11,查看主机开机时间
net statistics workstation12,查询用户列表
net user
13,获取本地管理员组的信息
net localgroup administrators14,查看当前在线用户
query user || qwinsta15,列出或断开本地计算机和连接的客户端的会话
net session16,查询端口列表
netstat -ano17 ,查询补丁信息
systeminfo
18,使用wmic 识别安装系统中的补丁情况
wmic qfe get Caption,Description,HotFixID,InstalledOn19,查询本机共享,命令如下
net share
# 利用wmic 查找共享,命令如下
wmic share get name,path,status20,查看路由表及所有可用接口的arp缓存表
route print
arp -a21,关闭防火墙命令
#windows server 2003 系统之前版本,命令如下:
netsh firewall set opmode disable
#windows server 2003 之后的系统版本
netsh advfirewall set allprofiles state off22,查看防火墙配置
netsh firewall show config23,修改防火墙配置
#windows server 2003 系统之前版本,命令如下:
netsh firewall add allowedprogram c:\nc.exe "allow nc" enable
#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"
# 允许3389端口放行,命令如下
netsh advfirewall firewall add rule name="remote Desktop" protocol=tcp dir=in localport =3389 action=allow
24,查看计算机代理配置情况
<div>reg query "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings"
</div>25,查询并开启远程连接服务
REG QUERY "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp" /V PortNumber

#在windows 2003中开启3389
wmic path win32_terminalservicesetting where (__CLASS !="") call setallowtsconnections 1

#在windows2008和widnows 2012中开启3389
wmic /namespace:\\root\cimv2\terminalservices path win32_terminalservicesetting where (__CLASS !="") call setallowtsconnections 1

wmic /namespace:\\root\cimv2\terminalservices path win32_tsgeneralsetting where (TerminalName='RDP-Tcp') call setuserauthenticationrequired 1

reg add "HKLM\SYSTEM\CURRENT\CONTROLSET\CONTROL\TERMINAL SERVER" /v fSingleSessionPerUser /t REG_DWORD /d 0 /f






页: [1]
查看完整版本: 内网渗透信息收集常见命令