-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathLocalChecks.txt
81 lines (76 loc) · 3.69 KB
/
LocalChecks.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
@Echo off
IF EXIST c:\program files\LAPS\CSE (
echo " Laps Check - LAPS allows for the each workstation or server to have a unique password which is managed through Active Directory. Please see https://technet.microsoft.com/en-us/mt227395.aspx"
) ELSE (
echo "Microsoft Local Administrator Password Solution (LAPS) not installed."
)
echo ***************************************************************************************************
echo "Who are the Admins?????"
SETLOCAL
SET "admins="
SET "prev="
FOR /f "delims=" %%A IN ('net localgroup administrators') DO (
CALL SET "admins=%%admins%% %%prev%%"
SET "prev=%%A"
)
SET admins=%admins:*- =%
ECHO admins: are "%admins%"
echo ***************************************************************************************************
echo ***************************************************************************************************
echo "Administrator Account Status"
net user "Administrator" |findstr "Account Active"
echo ***************************************************************************************************
echo "Pending restart"
reg query "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager" |findstr "PendingFileRenameOperations"
echo ***************************************************************************************************
echo ***************************************************************************************************
echo "unquoted Path"
wmic service get name,displayname,pathname,startmode |findstr /i "auto" |findstr /i /v "c:\windows\\" |findstr /i /v """
echo ***************************************************************************************************
echo ***************************************************************************************************
Echo "list installed patched"
wmic qfe
echo ***************************************************************************************************
echo ***************************************************************************************************
echo "Check for AV"
wmic product get name,version | findstr "Anti-Virus"
echo ***************************************************************************************************
echo ***************************************************************************************************
echo "Permissions Check"
echo Checking for Local Admin. Detecting permissions...
net session >nul 2>&1
if %errorLevel% == 0 (
echo Success: Administrative permissions confirmed.
) else (
echo Failure: User is not a Local Admin.
)
echo ***************************************************************************************************
echo ***************************************************************************************************
echo "C:\ Write access check"
echo ***************************************************************************************************
echo ***************************************************************************************************
echo "Wifi Test"
setlocal EnableDelayedExpansion
:main
title WiFi Password recovery
echo Harvesting all known passwords
call :get-Wifi-profiles r
pause
goto :eof
:get-Wifi-profiles <1=result-variable>
setlocal
FOR /F "usebackq tokens=2 delims=:" %%a in (
`netsh wlan show profiles ^| findstr /C:"All User Profile"`) DO (
set val=%%a
set val=!val:~1!
FOR /F "usebackq tokens=2 delims=':'" %%k in (
`netsh wlan show profile name^="!val!" key^=clear ^| findstr /C:"Key Content"`) do (
set keys=%%k
echo WiFi Name: [!val!] Password: [!keys:~1!]
)
)
(
endlocal
)
goto :eof
echo ***************************************************************************************************