NDC & PKI
[Day 9] 2. Secure Email Connection in Thunder Bird Using PKI
D
DITISS AdminPre-requisite: A mail server configured to send emails between accounts.
Setup Overview
- Install Thunderbird.
- For the two users, use POP3:
- Ports: 110 (incoming) and 25 (outgoing).
- User accounts:
userone@shuharilabs.localusertwo@shuharilabs.local
- Clear any testing emails.
- Test email sending between the two accounts to ensure basic functionality.
Task: Secure Email Communication
Objective: Create certificates for each user, bind them to private keys, and configure secure email communication.
Naming Conventions
User userone
userone- 004-001-DB-one.xdb – Database for .
userone - 004-003-CSR-one.pem – Certificate Signing Request.
- 004-003-CRT-one.crt – Certificate.
- 004-004-CRT_CHAIN_KEY-one.pfx – Certificate + Private Key.
User usertwo
usertwo- 005-001-DB-two.xdb – Database for .
usertwo - 005-003-CSR-two.pem – Certificate Signing Request.
- 005-003-CRT-two.crt – Certificate.
- 005-004-CRT_CHAIN_KEY-two.pfx – Certificate + Private Key.
Steps
1. Create Private Keys
- Generate private keys for both and
useronein their respective databases.usertwo
2. Configure Certificates for userone
userone-
Create a certificate in
:userone- Enter Common Name: .
userone@shuharilabs.local - Enter Email: .
userone@shuharilabs.local - Click OK and export the certificate to the folder.
userone
- Enter Common Name:
-
Go to Sub CA:
- Import the CSR from .
userone - Create a new certificate:
- Verify details under Subject.
- Go to Extensions:
- Add the email to the certificate. You should see a green tick confirming the email.
- Configure Key Usage:
- Select: ,
Digital Signature,Non-Repudiation,Key Encipherment.Data Encipherment
- Select:
- Configure Critical Section:
- Select: .
E-mail Protection
- Select:
- Double-check settings in the Advanced Tab.
- Click OK.
- Import the CSR from
-
Export the certificate with the appropriate name to the
folder.userone -
Go back to the
database:userone- Import certificates from Root CA and Sub CA.
-
Export the final certificate:
- Bind the private key with the extension.
.pfx - Save it in the folder.
userone
- Bind the private key with the
3. Configure Certificates for usertwo
usertwoRepeat the same steps for
usertwo4. Configure Thunderbird for Secure Email
-
Import Certificates:
- Root CA Certificate:
- Go to Settings -> Account Settings -> End-to-End Encryption -> Manage S/MIME Certificates -> Authorities -> Import.
- Select the Root CA certificate, check both checkboxes, and click OK.
- User Certificates:
- Go to Your Certificates -> Import -> Select Certificate -> Enter Password -> OK.
- Return to the settings and select the imported certificate.
- Root CA Certificate:
-
Perform these steps for both
anduserone.usertwo
5. Send and Verify Emails
Digitally Signed Email
- Send an email from to
userone:usertwo- Select S/MIME -> Digitally Sign.
- Send the email.
- Open the email in :
usertwo- Verify that the email is signed, ensuring Authentication and Integrity.
Digitally Signed and Encrypted Email
- Send another email from to
userone:usertwo- Select S/MIME -> Digitally Sign and Encrypt.
- Send the email.
- Open the email in :
usertwo- Verify that the email is encrypted and signed, ensuring Confidentiality, Authentication, and Integrity.
Read Next
8/26/2026
[Day 9] 3. Port forwarding using PREROUTING chain
### **Setup Details** - **Machine**: Debian (`192.168.80.128`) - **Service**: Apache installed (default port: 80) --- ## **Objective** Us...
8/26/2026
[Day 9] 4. BARNYARD2 and SNORT
**Objective:** Snort generates binary (U2) output, which Barnyard2 processes and writes into an SQL database. Finally, Apache with PHP will display th...