2022-09-29 06:06:15 +00:00
|
|
|
EXTENSION PASSIVE_WINDOWS_DETECT
|
2023-03-14 22:19:57 +00:00
|
|
|
REM VERSION 1.1
|
|
|
|
REM AUTHOR: Korben
|
2022-09-29 06:06:15 +00:00
|
|
|
|
2023-03-14 22:19:57 +00:00
|
|
|
REM_BLOCK DOCUMENTATION
|
|
|
|
Windows fully passive OS Detection and passive Detect Ready
|
|
|
|
Includes its own passive detect ready.
|
|
|
|
Does not require additional extensions.
|
2022-09-29 06:06:15 +00:00
|
|
|
|
2023-03-14 22:19:57 +00:00
|
|
|
USAGE:
|
|
|
|
Extension runs inline (here)
|
|
|
|
Place at beginning of payload (besides ATTACKMODE) to act as dynamic
|
|
|
|
boot delay
|
|
|
|
$_OS will be set to WINDOWS or NOT_WINDOWS
|
|
|
|
See end of payload for usage within payload
|
|
|
|
END_REM
|
2022-09-29 06:06:15 +00:00
|
|
|
|
|
|
|
REM CONFIGURATION:
|
2023-03-14 22:19:57 +00:00
|
|
|
DEFINE #MAX_WAIT 150
|
|
|
|
DEFINE #CHECK_INTERVAL 20
|
|
|
|
DEFINE #WINDOWS_HOST_REQUEST_COUNT 2
|
|
|
|
DEFINE #NOT_WINDOWS 7
|
2022-09-29 06:06:15 +00:00
|
|
|
|
2023-03-14 22:19:57 +00:00
|
|
|
$_OS = #NOT_WINDOWS
|
|
|
|
|
|
|
|
VAR $MAX_TRIES = #MAX_WAIT
|
2022-09-29 06:06:15 +00:00
|
|
|
WHILE(($_RECEIVED_HOST_LOCK_LED_REPLY == FALSE) && ($MAX_TRIES > 0))
|
2023-03-14 22:19:57 +00:00
|
|
|
DELAY #CHECK_INTERVAL
|
2022-09-29 06:06:15 +00:00
|
|
|
$MAX_TRIES = ($MAX_TRIES - 1)
|
|
|
|
END_WHILE
|
2023-03-14 22:19:57 +00:00
|
|
|
IF ($_HOST_CONFIGURATION_REQUEST_COUNT > #WINDOWS_HOST_REQUEST_COUNT) THEN
|
2022-09-29 06:06:15 +00:00
|
|
|
$_OS = WINDOWS
|
|
|
|
END_IF
|
|
|
|
|
2023-03-14 22:19:57 +00:00
|
|
|
REM_BLOCK EXAMPLE USAGE AFTER EXTENSION
|
|
|
|
IF ($_OS == WINDOWS) THEN
|
|
|
|
STRING HELLO WINDOWS!
|
|
|
|
ELSE
|
|
|
|
STRING HELLO WORLD!
|
|
|
|
END_IF
|
|
|
|
END_REM
|
2022-09-29 06:06:15 +00:00
|
|
|
END_EXTENSION
|