内网信息收集
关注 星云博创攻防实验室 公众号
0x01:windows(工作组合域)
whoami /user 和 whoami /priv 检查当前shell权限
systeminfo:查看系统信息以及补丁情况
echo %PROCESSOR_ARCHITECTURE% 查看当前操作系统位数
ps:经过测试,如果应用程序是在64位OS上运行的32位应用程序,则此环境变量的进程版本将返回x86,反之亦然。判断位数准确率并不是那么高 AMD64代表64位,如若返回x86则为32位 netstat -ano 查看tcp/udp网络以及端口情况 route print 查看路由 查看路由表非常有必要,可以看一些路由映射情况 hostname:机器名 wmic OS get Caption,CSDVersion,OSArchitecture,Version:查看当前操作系统 wmic process list brief:查看进程信息 net statistics workstation:查看主机开放时间 wmic startup get command,caption:查看启动程序信息 tasklist:查看进程列表 WMIC /Node:localhost /Namespace:\\root\SecurityCenter2 Path AntiVirusProduct Get displayName /Format:List 查看杀软名字 WMIC /Node:localhost /Namespace:\\root\SecurityCenter2 Path AntiVirusProduct Get displayName /Format:List WMIC /namespace:\\root\securitycenter2 path antivirusproduct GET displayName,productState, pathToSignedProductExe 获取杀软名字和安装路径 wmic onboarddevice get Desciption, DeviceType, Enabled, Status /format:list 判断是否为虚拟机 nslookup baidu.com 反向解析查询命令。也可以用来解析域名 wmic product get name,version :查看当前安装的程序 quser:查看在线用户 ipconfig /all命令查看时如果有primary dns suffix(主DNS后缀这一项)则说明在域内 没有则是工作组
tasklist /v :查看进程
net config workstation :查看当前登录域
cmdkey /l:远程桌面连接历史记录(把凭证取下来->本地解密)
dir /a %userprofile%\AppData\Local\Microsoft\Credentials\* 查看是否存在凭证
参考文章:https://www.cnblogs.com/websecyw/p/12842741.html
net user:查看本机的用户账户信息
net user xxx查看本机xxx用户信息
net user /domain :显示所在域的用户名单 指定在域控中执行
net user 域用户 /domain 获取某个域用户的详细信息
net user /domain xxx 123456 修改域用户密码,需要域管理员权限
net group “domain admins” /domain 获取域管理员列表
net group “domain controllers” /domain 查看域控制器(如果有多台)
net group “domain computers” /domain 查看域机器
net group /domain 查看域里面的工作组
net localgroup administrators 本机管理员[通常含有域用户]
net localgroup administrators /domain 登录本机的域管理员
net localgroup administrators workgroup\user001 /add 域用户添加到本机
net view 查看同一域内机器列表
net view \\ip 查看某ip共享
net view \\GHQ查看GHQ计算机的共享资源列表
net view /domain 查看内网存在多少个域
net view /domain:XYZ 查看XYZ域中的机器列表
query user || qwinsta:查看当前在线用户
net accounts /domain 查询域用户密码过期等信息
关防火墙:
win2003前
netsh firewall set opmode disable
win2003以后
netsh advfirewall set allprofiles state off
netsh firewall show config:查看防火墙配置
net user XXX /domain:查询指定用户的详细信息
route print 查看路由
powershell的get-wmi对象(待补吧 有些难)
get-wmiobject -list:自己的windows计算机支持那些可用的wmi类
判断主机是否是域内的方法:
探测域内存活主机
1:利用netbios快速探测内网
2:利用ICMP协议快速探测内网
依次对内网中的每个IP地址执行ping命令,可以快速找出内网中所有存活的主机
for /L %I in (1,1,254) DO @ping -w 1 -n 1 192.168.1.%I | findstr "TTL="
ps:经过测试,如果应用程序是在64位OS上运行的32位应用程序,则此环境变量的进程版本将返回x86,反之亦然。判断位数准确率并不是那么高 AMD64代表64位,如若返回x86则为32位 netstat -ano 查看tcp/udp网络以及端口情况 route print 查看路由 查看路由表非常有必要,可以看一些路由映射情况 hostname:机器名 wmic OS get Caption,CSDVersion,OSArchitecture,Version:查看当前操作系统 wmic process list brief:查看进程信息 net statistics workstation:查看主机开放时间 wmic startup get command,caption:查看启动程序信息 tasklist:查看进程列表 WMIC /Node:localhost /Namespace:\\root\SecurityCenter2 Path AntiVirusProduct Get displayName /Format:List 查看杀软名字 WMIC /Node:localhost /Namespace:\\root\SecurityCenter2 Path AntiVirusProduct Get displayName /Format:List WMIC /namespace:\\root\securitycenter2 path antivirusproduct GET displayName,productState, pathToSignedProductExe 获取杀软名字和安装路径 wmic onboarddevice get Desciption, DeviceType, Enabled, Status /format:list 判断是否为虚拟机 nslookup baidu.com 反向解析查询命令。也可以用来解析域名 wmic product get name,version :查看当前安装的程序 quser:查看在线用户 ipconfig /all命令查看时如果有primary dns suffix(主DNS后缀这一项)则说明在域内 没有则是工作组
扫描域内端口
scanline端口扫描工具
0x02:linux dmidecode -s system-product-name 如果输出含Virutal就是虚拟机,其他都是物理机 netstat -anpt 查看端口状态(开启了哪些服务,内网ip连接 ps -ef 查看进程状态(开启了哪些服务 cat /root/.bash_history 查看历史命令 find / -name *.cfg