简介

本文转载公众号----kali黑客笔记

信息收集是我们渗透前期和后期最重要的环节。前期的信息收集都比较常规化,获得的信息有多有少。而当我们获得系统shell后。后期的信息收集就变得尤为重要!

本文为大家介绍下,在windows环境中。常见的一些信息收集方法吧!注意,本文仅供学习和研究,坚决反对一切危害网络安全的行为。

获取网络信息

ipconfig   

查看系统架构

echo %PROCESSOR_ARCHITECTURE%   

查看安装的软件及版本

wmic product get name,version   powershell "Get-WmiObject -class win32_product | Select-Object -Property name,version"   

进程信息

tasklist   

效果如下:

计划任务

schtasks /query /fo LIST /v   

开机时间等信息

net statistics workstation   

查看当前通信端口

netstat -ano   

路由信息

route print   

防火墙相关

查看防火墙是否开启

netsh firewall show state   

关闭防火墙(由于系统版本问题 可能存在差异。)

`netsh firewall set opmode disable` 

示例

#允许8888端口进站   netsh advfirewall firewall add rule name=test dir=in action=allow protocol=tcp localport=8888   #允许8888端口出站   netsh advfirewall firewall add rule name=test dir=out action=allow protocol=tcp localport=8888   #允许a.exe进站   netsh advfirewall firewall add rule name=test dir=in action=allow program=c:\a.exe    #允许a.exe出站   netsh advfirewall firewall add rule name=test dir=out action=allow   program=c:\a.exe      

wifi密码收集

for /f "skip=9 tokens=1,2 delims=:" %i in ('netsh wlan show profiles') do @echo %j | findstr ‐i ‐v echo | netsh wlan show profiles %j key=clear   

arp信息

arp ‐a   

这里,我们仅对常用的一些命令进行了收集。其他命令可在实践中自行学习。