CSR Generation Process in IIS
Following are the steps that you have to perform while generating CSR:
In order to deploy/Install certificate in IIS, you can generate CSR in IIS server. Following are the steps to install Certificate in IIS:
1. To Generate CSR in IIS. Please login to server with Administrative Rights or you need to run IIS Manager with Administrative Rights using Runas option
2. Open IIS Manager or Internet Information Service Manager
3. In the server’s Home page under the IIS section, double-click Server Certificates.
4. Click on “Create Certificate Request”
Once you click on “Create Certificate Request” Button it will Open “Request Certificate” Wizard which “Distinguished Name Properties” page where you must fill the following information:
a. Common Name: Name of Domain or FQDN that you want to secure using SSL certificate.(e.g. www.testdomain.com)
b. Organization: Organization Name / Company Name that you want to get certificate. Certificate Authority Validates this Organization (e.g. My Test Company Ltd)
c. Organization Unit: Department for which this website project is running. (e.g. IT/HR/Sales/Marketing)
d. City/Locality: Put City/Locality name as per Legal Documents of company/ organization(e.g. Ahmedabad)
e. State/Province: Put State/province name as per Legal Documents of company/ organization (e.g. Gujarat)
f. Country/region: Put State/province name as per Legal Documents of company/organization (e.g. India/IN)
Once, above Information is filled click on “Next”
6. Now you will be at “Cryptographic Service Provider Properties” page in “Bit length” Section Select “2048” and Click “Next”
Above steps will Generate private key and CSR (Certificate Signing Request) on your IIS web server.
Problem with CSR Generated in IIS
Error in CSR Generated at IIS Server:
1. Each server has different methods to generate private key and CSR. When you generate CSR on servers you will get ASN.1 (Abstract Syntax Notion One) while generating CSR and private key. This ASN.1 sometimes provide some vital information to the person who has your CSR.
2. While reviewing one CSR today generate using IIS on Windows Server. I found that while analyzing ASN.1. CSR can disclose some vital information regarding network they are as below:
a. Username using which the CSR was generated,
b. Active Directory domain name if machine is part of domain
c. Hostname where machine is generated
Following is my test CSR:
— — — — — END NEW CERTIFICATE REQUEST — — — — —
Command to Get Information
Once, you get above CSR, copy it in any linux machine or install OpenSSL on your PC and run following command:
openssl.exe asn1parse -in mytest.csr
You will get following result when you parse CSR generated in Windows IIS. So, when someone says private key should be private in case of Windows, your CSR should be private as well. CSR generated in Windows can revile all very important and vital information regarding your IT Infrastructure that may help attackers to attack your IT environment.
You can see that when I run above command with CSR that I generated in IIS, it reviled following information:
Solution to this problem:
Currently, I can think of only solution for this one is. You can use OpenSSL on Windows to generate CSR that would help you to solve this problem but it is long process and also you need to create PFX file to install certificate in IIS server.
18 Years Experienced Professional in Cryptography, PKI, Information Security, Data Security, SSL Certificate, TLS Certificate, Cloud Security, Website Security, Email Security, Cloud HSM, IT Infrastructure Management, Cloud Management and Customer Support. Certified in Comptia Security+, EC Council CEHv10, MCSE, ITILv3. Domain Investor by Hobby owns 150+ domains.