SAFER plug-in: Difference between revisions

From NSIS Wiki
Jump to navigationJump to search
No edit summary
 
mNo edit summary
Line 5: Line 5:


== Description ==
== Description ==
'''Version:''' v0.1 - 20061222.<br>
'''Version:''' 0.1 - 20061222.<br>
'''Supported on:''' ''WinXP+''.
'''Supported on:''' ''WinXP+''.


Line 21: Line 21:
<highlight-nsis>
<highlight-nsis>
# Check for SAFER api support (this call should be supported on any NT system,
# Check for SAFER api support (this call should be supported on any NT system,
# but not Win9x so check for that before you call this dll
# but not Win9x so check for that before you call this dll (Links directly to CreateProcessAsUser)
   SAFER::SupportsSAFER  
   SAFER::SupportsSAFER  
# $0 now contains 1 if SAFER is supported or 0 if not   
# $0 now contains 1 if SAFER is supported or 0 if not   

Revision as of 22:43, 22 December 2006

Author: Anders (talk, contrib)


Links

SAFER.zip (3 KB)

Description

Version: 0.1 - 20061222.
Supported on: WinXP+.

The SAFER plugin uses the SAFER api to create a new process with a restricted token. Based on code/info from http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncode/html/secure11152004.asp

Supported levels are:

SAFER_LEVELID_CONSTRAINED
SAFER_LEVELID_UNTRUSTED
SAFER_LEVELID_NORMALUSER


Usage Example

# Check for SAFER api support (this call should be supported on any NT system,
# but not Win9x so check for that before you call this dll (Links directly to CreateProcessAsUser)
  SAFER::SupportsSAFER 
# $0 now contains 1 if SAFER is supported or 0 if not  
 
#Start calculater with SAFER_LEVELID_CONSTRAINED
SAFER::Exec CONSTRAINED "calc.exe"

Credits

Written by Anders (For fun and profit?)