标签:windows 信息安全
@echo offecho =================
echo Gathering basic information
echo =================
echo Host Configuration Tool >> basic-info.txt
echo Output Created on %DATE% at %TIME% >> basic-info.txt
echo ================= >> basic-info.txt
echo Domain: %USERDOMAIN% >> basic-info.txt
echo This host: %COMPUTERNAME% >> basic-info.txt
echo This script running as: %USERNAME% >> basic-info.txt
echo ================= >> basic-info.txt
echo Environment Variables: >> basic-info.txt
set >> basic-info.txt
echo ================= >> basic-info.txt
echo System Info: >> basic-info.txt
systeminfo >> basic-info.txt
echo Done!
echo.
echo =================
echo Detecting installed software
echo =================
reg export HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall reg.txt
find "DisplayName" reg.txt |find /V "ParentDisplayName" > tmplist.txt
for /f "tokens=2,3 delims==" %%a in (tmplist.txt) do (echo %%a >> software.txt)
echo Done!
echo.
echo =================
echo Detecting installed hotfixes
echo =================
wmic qfe list >hotfixes.txt
echo Done!
echo.
echo =================
echo Creating list of registered services
echo =================
sc query state= all >> services.txt
echo Done!
echo.
echo Enumerating network servers visible to this host
echo ================= > net-view.txt
net view >> net-view.txt
echo Done!
echo.
echo =================
echo Gathering local user and group information
echo =================
net localgroup >> localgroups.txt
net user >> localusers.txt
net localgroup administrators >> localadminusers.txt
echo Done!
echo.
echo =================
echo Gathering shared folder information
echo =================
net view /a \%COMPUTERNAME% >> shares.txt
echo Done!
echo.
echo =================
echo Gathering IP configuration
echo =================
ipconfig /all >> ipconfig.txt
echo Done!
echo.
echo =================
echo Detecting open ports
echo =================
netstat -ban >> netstat.txt
echo Done!
echo.
echo =================
echo Checking scheduled jobs
echo =================
at >> at.txt
echo Done!
echo.
echo =================
echo Checking IIS sites
echo =================
%windir%\system32\inetsrv\AppCmd.exe list site > IIS_sites.txt
echo Done!
echo.
echo =================
echo Dumping the registry
echo =================
reg export HKLM hklm.reg
reg export HKCU hkcu.reg
reg export HKCU hkcr.reg
reg export HKCU hku.reg
reg export HKCU hkcc.reg
echo Done!
echo.
echo =================
echo Collecting logs, this may take a bit...
echo =================
..\psloglist -x system > system.log
..\psloglist -x security > security.log
..\psloglist -x application > application.log
echo Done!
echo.
echo =================
echo Cleaning up temporary files
echo =================
del reg.txt tmplist.txt
echo Done!
echo.
echo =================
echo Host Information Gathering Script finished.
echo =================
echo.
标签:windows 信息安全
原文地址:http://blog.51cto.com/hashlinux/2092847