Make IE a little safer and more secure

Source: Internet
Author: User

IE's 0day is full, but there are still many fans of IE

While browsing the Web page comfortably, do not forget to properly avoid risks

Because many IE vulnerabilities write files to the system32 directory, firewall and AV are terminated .. All of these require Administrator permissions.
Based on this, Michael Howard wrote a tool named DropMyRights to reduce IE permissions.

The principle is to delete some permissions and SID of the user's current token, and use the processed token to create new processes, such as IE, OE, Firefox, and FOXMAIL...

Installation Process:

1. Download DropMyRights. msi
Http://download.microsoft.com/download/f/2/e/f2e49491-efde-4bca-9057-adc89c476ed4/DropMyRights.msi

2. copy dropmyrights.exe to a "safe" directory after installation (set acl, otherwise there will be new risks)

3. Create a shortcut in a format similar to the following:
C: safeDIRdropmyrights.exe "c: program filesinternet ‑eristme.exe"

4. 名: dropmyrights.exe. You 'd better change it to IE safe, IE (non-admin), and so on.

5. Change the icon that looks comfortable in the attribute. It is best to use IE

OK. You will enable this shortcut when you access the internet. Call ie instead of clicking the original IE.

Bytes

// Of course, this tool is easy to implement. The core code provided by the following is
//////////////////////////////////////// //////////////////////////////////////// //
DWORD wmain (int argc, wchar_t ** argv ){

DWORD fStatus = ERROR_SUCCESS;

If (2! = Argc & 3! = Argc ){
Usage ();
Return ERROR_INVALID_PARAMETER;
}

// Get the SAFER level
DWORD hSaferLevel = SAFER_LEVELID_NORMALUSER;
If (3 = argc & argv [2]) {
Switch (argv [2] [0]) {
Case C:
Case c: hSaferLevel = SAFER_LEVELID_CONSTRAINED;
Break;
Case U:
Case u: hSaferLevel = SAFER_LEVELID_UNTRUSTED;
Break;

Default: hSaferLevel = SAFER_LEVELID_NORMALUSER;
Break;
}
}

// Get the command line, and make sure its not bogus
Wchar_t * wszPath = argv [1];
Size_t cchLen = 0;
If (FAILED (StringCchLength (wszPath, MAX_PATH, & cchLen )))
Return ERROR_INVALID_PARAMETER;

SAFER_LEVEL_HANDLE hAuthzLevel = NULL;
If (SaferCreateLevel (SAFER_SCOPEID_USER,
HSaferLevel,
0,
& HAuthzLevel, NULL )){

// Generate the restricted token we will use.
HANDLE hToken = NULL;
If (SaferComputeTokenFromLevel (
HAuthzLevel, // SAFER Level handle
NULL, // NULL is current thread token.
& HToken, // Target token
0, // No flags
NULL) {// Reserved

STARTUPINFO si;
ZeroMemory (& si, sizeof (STARTUPINFO ));
Si. cb = sizeof (STARTUPINFO );
Si. lpDesktop = NULL;

// Spin up the new process
PROCESS_INFORMATION pi;
If (CreateProcessAsUser (
HToken,
WszPath, NULL,
NULL, NULL,
FALSE, CREATE_NEW_CONSOLE,
NULL, NULL,
& Si, & pi )){

CloseHandle (pi. hProcess );
CloseHandle (pi. hThread );

} Else {
FStatus = GetLastError ();
Fwprintf (stderr, L "CreateProcessAsUser failed (% lu)", fStatus );
}
} Else {
FStatus = GetLastError ();
}

SaferCloseLevel (hAuthzLevel );

} Else {
FStatus = GetLastError ();
}

Return fStatus;
}

 

For more details, refer to the original article on MSDN.
<Browsing the Web and Reading E-mail Safely as an Administrator>

Michael Howard
Microsoft Security Engineering

November 15,200 4

Asp? Url =/library/en-us/dncode/html/secure11152004.asp "> http://msdn.microsoft.com/library/default.asp? Url =/library/en-us/dncode/html/secure11152004.asp


Ps: "c: program filesinternet ‑eriexplore.exe"
Note that the iexplore.exe path must be enclosed by quotation marks.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.