内网信息收集(一)工作组信息收集

因为最近在学《内网安全攻防渗透测试实战指南》,因此将一些笔记记录在这里,同时感谢大佬精彩的讲解。
工作组信息收集
注意:xp下权限低的用户不能用wmic命令,wmic非常适用于内网的横向渗透
1.查询网络配置
ipconfig /all
2.查询用户列表
net user 查看本机用户列表
net localgroup administrators 本机管理员(通常含有域用户)
query user || qwinsta 查看当前在线用户
3.查询进程列表
tasklist /v
wmic process list brief
4.本机信息收集
获取操作系统和版本信息
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”
5.查询端口列表
netstat -ano 更新端口是8530 DNS服务器53端口
6.查询补丁列表
systeminfo 通过这个命令也能判断有没有域
wmic qfe get description,installedon
7.查询本机共享
net share
net share \hostname
wmic share get name,path,status 域类的共享很多时候相同
8.查询防火墙配置
netsh firewall show config
关闭防火墙
A.Windows Server 2003系统及之前版本
netsh firewall set opmode disable
B.Windows Server 2003之后的系统版本
netsh advfirewall set allprofiles state off
自定义防火墙日志储存位置
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
9.查询并开启远程连接服务
查询远程连接端口
Reg query “hkey_local_machine\system\currentcontrolset\control\terminal server\winstations\RDP-Tcp” /v portnumber
10.查询域内主机
net view /domain:hacker
11.查询当前权限
whoami /all 获取域SID
net user XXX /domain 查询指定账户的详细信息

猜你喜欢

转载自blog.csdn.net/bring_coco/article/details/109456042
今日推荐