通过枚举SAM下的子键查看系统所有帐户,检测一般网络上流传的隐藏帐户是可以的,对付ROOTKIT就无能为力了...-
- @echo off
- setlocal enabledelayedexpansion
- if "%1"# == "-#"# goto :#
- set "path_=cmd /k start "" %0 -#"
- set "wpws_=wmic path Win32_Service call"
- set "wpws__=wmic path Win32_Service where name='#' call"
- (%wpws_% create name='#' DisplayName='#' PathName='!path_!' DesktopInteract='-1'
- %wpws__% startservice&%wpws__% delete)>nul
- exit /b
- exit
- :#
- set "path__=SAM\SAM\Domains\Account\Users\Names"
- for /f "usebackq skip=6 tokens=2 delims={}" %%a in (
- `"wmic /namespace:\\root\default path stdregprov call EnumKey ^&h80000002,"%path__%""`
- ) do (
- set names=%%~a
- set names=!names:", "=,!
- )
- echo.
- echo. 所有系统帐户:!names!
- echo.
- echo.
- exit /b
复制代码
|