> For the complete documentation index, see [llms.txt](https://www.marialc.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.marialc.com/pentesterlab-labs/recon-badge/recon_08-alt-name.md).

# recon\_08 (alt name)

View the exercise here: [PentesterLab: Recon 08](https://pentesterlab.com/exercises/recon_08/course)

### **OBJECTIVE**

For this challenge, your goal is to access the alternative names in the certificate.

### **ALTERNATIVE NAMES**

When accessing a TLS server, it often pays off to check the content of the certificate used. It's common for TLS servers to have certificates that are valid for more than one name (named alternative names). Looking for alternative names can be done in your client or by using **openssl**.

### **SOLUTION**

In the browser, click the browser settings at the left side of the URL.

Click `Connection is secure` then click `Certificate is valid`.

<figure><img src="https://290105472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F89FZKOizBQcf0e0Qdrp8%2Fuploads%2F3NEjbe7heSPC7agdjfFO%2FScreenshot_2024-08-01_at_02.45.30.png?alt=media&amp;token=4513d983-5006-4959-89ae-beaf6d75df52" alt="" width="563"><figcaption></figcaption></figure>

Select the `Details` tab

<figure><img src="https://290105472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F89FZKOizBQcf0e0Qdrp8%2Fuploads%2FmHNDdGMO95Pkd3jeD4iO%2FScreenshot_2024-08-01_at_02.46.06.png?alt=media&amp;token=1d02120d-769a-42cf-8cff-7125964dda31" alt="" width="563"><figcaption></figcaption></figure>

Scroll the `Certificate Fields` list then select `Certificate Subject Alternative Name`

Copy the `DNS Name` field value

<figure><img src="https://290105472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F89FZKOizBQcf0e0Qdrp8%2Fuploads%2F8Vkunb26nDcTawhRLhdZ%2FScreenshot_2024-08-01_at_02.49.05.png?alt=media&amp;token=8ecf8759-db29-4730-88da-40ffee569bc2" alt="" width="563"><figcaption></figcaption></figure>

{% hint style="success" %}
Open it in your browser to get the flag
{% endhint %}

<figure><img src="https://290105472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F89FZKOizBQcf0e0Qdrp8%2Fuploads%2FvC745MgIe2fwnnZI99Ra%2Fimage.png?alt=media&amp;token=8ec77b23-fffe-4436-b250-bc3ef92d0477" alt="" width="563"><figcaption></figcaption></figure>

&#x20;

***

**An alternative solution using curl:**

{% hint style="danger" %}
If we use **http**, we’ll obtain the flag for recon 06 ❌
{% endhint %}

<figure><img src="https://290105472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F89FZKOizBQcf0e0Qdrp8%2Fuploads%2FO7kqcxfEzScvt2hQfKn1%2Fimage%201.png?alt=media&amp;token=b050b617-1ee1-4623-8805-d4e343f35a26" alt="" width="563"><figcaption></figcaption></figure>

{% hint style="success" %}
We’ll get the recon 08 flag when **https** is used
{% endhint %}

<figure><img src="https://290105472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F89FZKOizBQcf0e0Qdrp8%2Fuploads%2FbJAaJTlLJI832LUvCrcg%2Fimage%202.png?alt=media&amp;token=e8e9ffc9-b14c-4a2c-8b59-448831904bd9" alt="" width="563"><figcaption></figcaption></figure>
