95 lines
4.2 KiB
Plaintext
95 lines
4.2 KiB
Plaintext
#include <windows.h>
|
|
#include <ntverp.h>
|
|
#include "resource.h"
|
|
|
|
#define VER_FILETYPE VFT_APP
|
|
#define VER_FILESUBTYPE VFT2_UNKNOWN
|
|
#define VER_FILEDESCRIPTION_STR "Utility for Software Restriction Policies"
|
|
#define VER_INTERNALNAME_STR "SAFERBOX\0"
|
|
#define VER_ORIGINALFILENAME_STR "SAFERBOX.EXE"
|
|
|
|
|
|
STRINGTABLE DISCARDABLE
|
|
BEGIN
|
|
|
|
IDS_CMD_QUERY "query"
|
|
IDS_CMD_RUN "run"
|
|
IDS_CMD_HASH "hash"
|
|
IDS_CMD_LIST "list"
|
|
IDS_CMD_LISTRULES "rules"
|
|
IDS_CMD_REGKEY "regkey"
|
|
IDS_CMD_DUMPREG "dumpreg"
|
|
IDS_FLAG_LEVELID "l"
|
|
IDS_FLAG_RULETYPES "r"
|
|
IDS_RULETYPES_PATH "p"
|
|
IDS_RULETYPES_HASH "h"
|
|
IDS_RULETYPES_CERTIFICATE "c"
|
|
IDS_FLAG_SCOPE "s"
|
|
IDS_SCOPE_HKLM "lm"
|
|
IDS_SCOPE_HKCU "cu"
|
|
IDS_USAGE_SYNTAX "Usage: saferbox [run | query | list | hash | rules] [options] <program> [args]\n\
|
|
\x20Copyright (c) Microsoft Corp., 2000 authors: jlawson and johnla\n\
|
|
\x20 saferbox query [/r p|h|c] <program>\n\
|
|
\x20 saferbox run /l levelId <program>\n\
|
|
\x20 saferbox hash <program>\n\
|
|
\x20 saferbox list [/s lm|cu]\n\
|
|
\x20 saferbox rules [/s lm|cu]\n\
|
|
\x20 saferbox regkey <registry key>\n\
|
|
\x20 saferbox dumpreg\n\
|
|
\x20 saferbox help\n\
|
|
\x20\nCommands:\n\
|
|
\x20 query\treturns the Software Restriction Policy for <program>.\n\
|
|
\x20 run\t\truns <program> at the level specified.\n\
|
|
\x20 hash\t\tcomputes the hash of <program>.\n\
|
|
\x20 list\t\tlists all the Software Restriction Policy levels.\n\
|
|
\x20 rules\tlists all Software Restriction Policy rules.\n\
|
|
\x20 regkey\tlists the value for the registry key.\n\
|
|
\x20 dumpreg\tdumps the HKLM and HKCU sections of the registry related to SAFER.\n\
|
|
\x20\nOptions:\n\
|
|
\x20 /l\t\tSoftware Restriction level (in decimal) at which to run the program.\n\
|
|
\x20 \t\tUse list to print the possible level values.\n\
|
|
\x20 /r\t\tTypes of rules to use when identifying software.\n\
|
|
\x20 \t\tp: use path rules.\n\
|
|
\x20 \t\th: use hash rules.\n\
|
|
\x20 \t\tc: use publisher certificate rules.\n\
|
|
\x20 <program>\tprogram to determine Software Restriction Policy on.\n \
|
|
\x20 [args]\targuments to the program.\n\
|
|
\x20 /s\t\tLook in either User or Computer side of policy.\n \
|
|
\x20 \t\tlm: List only local machine rules.\n\
|
|
\x20 \t\tcu: List only current user rules.\n"
|
|
|
|
IDS_USINGDEFAULTRULE "Program matched no rule. Using default rule.\n"
|
|
IDS_MATCHPATH "Program matched a path rule: %s\n"
|
|
IDS_MATCHHASH "Program matched a hash rule.\n"
|
|
IDS_MATCHZONE "Program matched a zone rule.\n"
|
|
IDS_MATCHCERTORDEFAULT "Program matched a certificate rule or the default rule.\n"
|
|
IDS_GUIDRULEIS "GUID for rule is: %s\n"
|
|
IDS_SECURITYLEVEL "<<%s>> (LevelId: 0x%X , %d )\n"
|
|
IDS_SECURITYLEVELDESC "\tDescription: %s\n"
|
|
|
|
IDS_ERR_NOLEVELSFOUND "No authorization Levels found for your image.\n"
|
|
IDS_ERR_NOLEVELID "You must supply a levelId to run the program.\n"
|
|
IDS_ERR_CMDLINETOOLONG "Command line length too long.\n"
|
|
IDS_ERR_NOAPPNAME "No application name specified.\n"
|
|
IDS_ERR_IMGACCESSERR "An error occurred trying to identify your image"
|
|
IDS_ERR_ERRMATCHRULE "Error retrieving matching rule"
|
|
IDS_ERR_PROCESSNOLAUNCH "Process not allowed to launch at specified level.\n"
|
|
IDS_ERR_LEVELOPENERR "Unable to open the authorization Level specified (%d).\n"
|
|
IDS_ERR_PROCESSLAUNCHERR "Could not launch process"
|
|
IDS_PROCSUSPENDED "Process %d launched and suspended. Attach a debugger and then\nstrike any key to resume the thread and allow debugging."
|
|
IDS_THREADRESUMED "Thread resumed.\n"
|
|
IDS_ERR_GETVERERR "Could not retrieve advapi32.dll version information"
|
|
IDS_ERR_INCORRECTOSVER "This program requires a later version of the operating system.\nOS Level %d.%d.%d is less than required %d.%d.%d\n"
|
|
IDS_LISTING_HKCU "List of Current User scope:\n---------------------------\n"
|
|
IDS_LISTING_HKLM "List of Local Machine scope:\n----------------------------\n"
|
|
IDS_NORULESFOUND " No rules found for this Security Level.\n"
|
|
IDS_DEFAULTLEVEL "The DEFAULT level is:\n---------------------\n"
|
|
IDS_ERR_REGNOTFOUND "Registry key not found.\n"
|
|
IDS_ERR_NOREGVALUE "Registry key supplied had no value. Could not look up registry key.\n"
|
|
IDS_REGVALUE "The registry value is:\n"
|
|
END
|
|
|
|
IDI_APP ICON DISCARDABLE "saferbox.ico"
|
|
|
|
#include "common.ver"
|