Aleksandar's computer workshop
Let's see what Aleksandar was fixing today.
My findings, tips & tricks related to computers, internet, programming and other stuff I was working with.

Certificate Signing Request (CSR) Generation Instructions with OpenSSL on Windows

April 17, 2009 19:55 by Aleksandar

To generate a CSR, you will need to create a key pair for your server. These two items are a digital certificate key pair and cannot be separated. If you lose your public/private key file or your password and generate a new one, your SSL Certificate will no longer match. You will have to request a new SSL Certificate and may be charged.
 
Step 1: Generate a Key Pair

The utility "openssl" is used to generate the key and CSR. You can download the binary from here
http://www.openssl.org/related/binaries.html
http://www.slproweb.com/products/Win32OpenSSL.html
 
Type the following command at the prompt:

openssl genrsa -des3 -out www.gsmblog.com.key 1024

Note: For Extended Validation certificates the key bit length must be 2048.
 
This command generates a 1024 bit RSA private key and stores it in the file www.gsmblog.com.key.
 
When prompted for a pass phrase: enter a secure password and remember it, as this pass phrase is what protects the private key. Both the private key and the certificate are required to enable SSL.
 
NOTE: To bypass the pass phrase requirement, omit the -des3 option when generating the private key.
If you leave the private key unprotected, access to the server should be restricted so that only authorized server administrators can access or read the private key file.


 
Step 2: Generate the CSR
 
Type the following command at the prompt:

openssl req -new -key www.gsmblog.com.key -out www.gsmblog.com.csr 



This command will prompt for the following X.509 attributes of the certificate:
 
Country Name: Use the two-letter code without punctuation for country, for example: NL, DE or US.
 
State or Province: Spell out the state completely; do not abbreviate the state or province name, for example: Flevoland
 
Locality or City: The Locality field is the city or town name, for example: Amsterdam. Do not abbreviate. For example: Saint Louis, not St. Louis
 
Company: If your company or department has an &, @, or any other symbol using the shift key in its name, you must spell out the symbol or omit it to enroll. Example: XY & Z Corporation would be XYZ Corporation or XY and Z Corportation.
 
Organizational Unit: This field is optional; but can be used to help identify certificates registered to an organization. The Organizational Unit (OU) field is the name of the department or organization unit making the request. To skip the OU field, press Enter on your keyboard.
 
Common Name: The Common Name is the Host + Domain Name. It looks like www.gsmblog.com or "gsmblog.com".
 
Certificates can only be used on Web servers using the Common Name specified during enrollment. For example, a certificate for the domain "domain.com" will receive a warning if accessing a site named "www.domain.com" or "secure.domain.com", because "www.domain.com" and "secure.domain.com" are different from "domain.com".
 
Please do not enter your email address, challenge password or an optional company name when generating the CSR.
 
A public/private key pair has now been created. The private key (www.gsmblog.com.key) is stored locally on the server machine and is used for decryption. The public portion, in the form of a Certificate Signing Request (certrequest.csr), will be for certificate enrollment.
 
To copy and paste the information into the enrollment form, open the file in a text editor such as Notepad and save it as a .txt file. Do not use Microsoft Word as it may insert extra hidden characters that will alter the contents of the CSR.



Once the CSR has been created, proceed to Enrollment.
 
Step 3: Backup your private key
 
Backup up the .key file and the corresponding pass phrase. A good choice is to create a copy of this file onto a diskette or other removable media. While backing up the private key is not required, having one will be helpful in the instance of server failure.

 

 

MAC Address Decoder

October 2, 2008 12:42 by Aleksandar

Nice online tool to identify the manufacturer by looking up the Ethernet MAC address.

http://www.techzoom.net/lookup/check-mac.en


How to determine that hardware DEP is available and configured on your computer

September 28, 2008 23:05 by Aleksandar

To confirm that hardware DEP is working in Windows, use one of the following methods.

You can use the Wmic command-line tool to examine the DEP settings. To determine whether hardware-enforced DEP is available, follow these steps:

 

Click Start, click Run, type cmd in the Open box, and then click OK.

 

At the command prompt, type the following command, and then press ENTER:

wmic OS Get DataExecutionPrevention_Available

If the output is "TRUE," hardware-enforced DEP is available.

To determine the current DEP support policy, follow these steps.

 

Click Start, click Run, type cmd in the Open box, and then click OK.

 

At the command prompt, type the following command, and then press ENTER:

wmic OS Get DataExecutionPrevention_SupportPolicy

The value returned will be 0, 1, 2 or 3. This value corresponds to one of the DEP support policies that are described in the following table.

DataExecutionPrevention_SupportPolicy property value

Policy Level

Description

2

OptIn (default configuration)

Only Windows system components and services have DEP applied

3

OptOut

DEP is enabled for all processes. Administrators can manually create a list of specific applications which do not have DEP applied

1

AlwaysOn

DEP is enabled for all processes

0

AlwaysOff

DEP is not enabled for any processes

Note To verify that Windows is running with hardware DEP enabled, examine the DataExecutionPrevention_Drivers property of the Win32_OperatingSystem class. In some system configurations, hardware DEP may be disabled by using the /nopae or /execute switches in the Boot.ini file. To examine this property, type the following command at a command prompt:

wmic OS Get DataExecutionPrevention_Drivers

Output sample on my PC:


Tags:
Categories: Hardware | Security | Windows
Actions: E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed

Boot Parameters to Configure DEP and PAE

September 28, 2008 21:27 by Aleksandar

DEP - Data Execution Prevention
PAE - Physical Address Extension

DEP is a highly effective security feature that should not be disabled unless you have no alternative. The default settings for DEP and PAE are optimal for most systems. Do not change the default settings unless they interfere with essential processing tasks. This section is included to show you how to configure these features, but it should not be interpreted as a recommendation to change the default settings.

DEP and PAE Boot Parameters

On operating systems prior to Windows Vista, DEP and PAE are enabled at boot time and are configured by using the following four boot parameters:

On Windows Vista, DEP and PAE are enabled at boot time and are configured by setting values for the nx and pae parameters using the BCDEdit /set command.

These boot parameters have conflicting effects. To configure DEP and PAE, use only the parameter combinations that are described in the documentation for each parameter and discussed in this topic. Do not experiment with conflicting parameters, especially on a production system.

The Interaction of DEP and PAE Boot Parameters

There are two types of DEP:

  • Hardware-enforced DEP enables DEP for both kernel-mode and user-mode processes. It must be supported by the processor and the operating system.
  • Software-enforced DEP enables DEP only on user-mode processes. It must be supported by the operating system.

DEP is supported by Windows XP with SP2, Windows Server 2003 with SP1, and Windows Vista, and later versions of Windows.

On 32-bit versions of Windows, hardware-enforced DEP requires PAE, which is supported by all Windows operating systems that support DEP. When DEP is enabled on a computer with a processor that supports hardware-enforced DEP, Windows automatically enables PAE and ignores the boot parameter values that disable it.

The parameter combinations for each Windows operating system are summarized in the following section.

DEP and PAE Parameter Combinations

The following list describes the boot parameter combinations that can be used to configure DEP and PAE.

 

Action

Prior to Windows Vista

Windows Vista

To enable DEP

(Select one parameter combination)

When DEP is enabled on computers that support hardware-enforced DEP, these parameter combinations also enable PAE.

/noexecute=alwayson
/noexecute=optin
/noexecute=optout

/set [{ID}] nx AlwaysOn

/set [{ID}] nx OptIn

/set [{ID}] nx OptOut

To enable DEP and PAE on systems with software-enforced DEP

(Select one parameter combination)

On computers that support hardware-enforced DEP, PAE is automatically enabled when you enable DEP.

/noexecute=alwayson /pae
/noexecute=optin /pae
/noexecute=optout /pae

/set [{ID}] nx AlwaysOn

/set [{ID}] pae default



/set [{ID}] nx OptIn

/set [{ID}] pae default



/set [{ID}] nx OptOut

/set [{ID}] pae default

To disable DEP, but enable PAE

/noexecute=alwaysoff /pae

(Windows XP with SP2)

/set [{ID}] nx AlwaysOff

/set [{ID}] pae ForceEnable


To disable DEP, but enable PAE

/noexecute=alwayoff
/noexecute=alwaysoff /pae

(Windows Server 2003 with SP1 only)

(These parameter combinations are equivalent.)

/set [{ID}] nx AlwaysOff

/set [{ID}] pae ForceEnable

To disable both DEP and PAE

/noexecute=alwaysoff
/noexecute=alwaysoff /nopae

(Windows XP with SP2)

(These parameter combinations are equivalent.)

/set [{ID}] nx AlwaysOff

/set [{ID}] pae ForceDisable

To disable both DEP and PAE

/execute

(Windows Server 2003 with SP1 only)