> ## Documentation Index
> Fetch the complete documentation index at: https://docs.jaspervanzeir.be/llms.txt
> Use this file to discover all available pages before exploring further.

# Vraag 01 - The story begins

> Mockexamen Web Pentesting Fundamentals vraag 1.

<Card title="Mockexamen overzicht" icon="arrow-left" href="/mockexamen">
  Terug naar alle mockexamen vragen.
</Card>

## Vraag

Question 1 vroeg om de secret code in te vullen om verder te gaan.

```text theme={null}
Enter the secret code to continue
```

## Startpunt

Ik kwam op de eerste challenge terecht:

```text theme={null}
https://mockexam.wpt.edu.technet.howest.be/challenge.php?challenge=1
```

De pagina vroeg om een secret code om verder te gaan.

<Frame>
  <img src="https://mintcdn.com/z3r0d4yj/uXdAOcCTR0VYlNiQ/images/mockexamen-vraag-01-01-start-page.png?fit=max&auto=format&n=uXdAOcCTR0VYlNiQ&q=85&s=ef88bb730956d467396b57ba5f70cba3" alt="Challenge 1 start page" width="3456" height="2064" data-path="images/mockexamen-vraag-01-01-start-page.png" />
</Frame>

## Weg naar het antwoord

### 1. Page source

Ik begon met een simpele recon stap en opende de page source. Daar zag ik bij het inputveld meteen iets opvallends:

```html theme={null}
<input type="text" name="pin" id=code:6Yd0P>
```

De pin stond dus rechtstreeks in het `id` attribuut. Ik kopieerde de waarde na `code:`.

<Frame>
  <img src="https://mintcdn.com/z3r0d4yj/uXdAOcCTR0VYlNiQ/images/mockexamen-vraag-01-02-page-source-pin.png?fit=max&auto=format&n=uXdAOcCTR0VYlNiQ&q=85&s=26ab65c083650d6767156f28f6c34e4f" alt="Page source showing the pin in the input id" width="3456" height="2064" data-path="images/mockexamen-vraag-01-02-page-source-pin.png" />
</Frame>

### 2. Submitten

Ik vulde de code in het tekstveld in:

```text theme={null}
6Yd0P
```

Daarna klikte ik op **Submit**. De pagina bevestigde dat het antwoord correct was:

```text theme={null}
Congratulations, challenge solved! Welcome to the next level.
```

<Frame>
  <img src="https://mintcdn.com/z3r0d4yj/uXdAOcCTR0VYlNiQ/images/mockexamen-vraag-01-03-solved.png?fit=max&auto=format&n=uXdAOcCTR0VYlNiQ&q=85&s=f36299b7f8b92b431bc8379901af03e2" alt="Challenge 1 solved message" width="3456" height="2064" data-path="images/mockexamen-vraag-01-03-solved.png" />
</Frame>

### 3. Kwetsbaarheid

Dit is vooral **information disclosure via source code**. De geheime waarde stond client-side in de HTML en kon dus gelezen worden zonder brute force of bypass.

## Korte oplossing

1. Ik opende de challenge en zag dat de pagina om een code vroeg.
2. Ik deed eerst recon via de page source.
3. In het inputveld zag ik `id=code:6Yd0P`.
4. Ik kopieerde `6Yd0P`, plakte die in het veld en klikte op **Submit**.

## Antwoord

```text theme={null}
6Yd0P
```

## Wat onthouden

Bij eenvoudige examenvragen altijd eerst de HTML source controleren. Secrets kunnen verstopt zitten in comments, hidden fields, `id`, `name`, `value`, `class` of andere attributen.
