Skip to content

Commit

Permalink
8/14CTF入門
Browse files Browse the repository at this point in the history
  • Loading branch information
YusukeKato committed Aug 14, 2024
1 parent 34d6f49 commit ce450d3
Show file tree
Hide file tree
Showing 12 changed files with 159 additions and 0 deletions.
Binary file added images/2024/20240814_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/2024/20240814_1.png.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/2024/20240814_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/2024/20240814_2.png.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/2024/20240814_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/2024/20240814_3.png.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/2024/20240814_4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/2024/20240814_4.png.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/2024/20240814_5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/2024/20240814_5.png.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions markdown/2024/0813.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
大学生の頃に競技プログラミングは少し触れたことがあって、いずれはCTFにも挑戦してみたいとは常々考えていました。
そんな中でタイミング良くAlpacaHackが公開されたのでさっそく挑戦してみようと思います。

## 私のCTF環境
- Ubuntu 22.04 LTS

## AlpacaHackとは
AlpacaHackは2024年8月(おそらく)に公開された個人戦CTFを開催するプラットフォームです。
CTFでは複数人でチームを組んでコンテストに参加するのが一般的っぽいですが、
Expand All @@ -35,6 +38,10 @@ CTFは「Capture The Flag(旗取り合戦?)」の略称で、情報セキ
下記の画像がAlpacaHackのHomeページです。
Homeでは次に開催するコンテストの日程を確認できます。

https://alpacahack.com/

AlpacaHack公式サイト(再掲)

2024/20240813_1.png

AlpacaHackのHomeページ
Expand Down Expand Up @@ -89,3 +96,10 @@ keymoon(ID:kymn_)さんのポスト
AlpacaHackは継続的にコンテストを開催するとのことなので、私も細く長く続けていってCTFに慣れていきたいですね。
それでは、また。

## 次回の記事
2024年8月14日の記事です。

https://yusukekato.jp/html/2024/0814.html

title=AlpacaHackで始めるCTF入門2:DreamhackでCTF入門

145 changes: 145 additions & 0 deletions markdown/2024/0814.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
# メタデータ
- title=AlpacaHackで始めるCTF入門2:DreamhackでCTF入門
- description=個人戦CTFを開催するプラットフォーム「AlpacaHack」を通じてCTFに入門してみようと思います。DreamHackも利用します。
- date=2024年8月14日(水)
- update=2024年8月14日(水)
- math=false

## はじめに
AlpacaHackでCTFを始めてみましたが、私のようにCTFが何なのかもよく分かっていない場合は
スタートラインに立つために他のサイトでも勉強したほうが良いみたいです。
ということで今回は韓国のCTFサイトである「Dreamhack」に挑戦してみようと思います。

DreamhackはCTFのコンテストを開催しているのはもちろんのこと、
幅広いジャンルの教育講座も充実しているため、
かなり初心者にも優しい気がしました。
また、サイト上では韓国語も使われていますが、
教育講座の説明文は私が確認した範囲では英語で書かれていたのである程度は読めると思います。

https://dreamhack.io/

Dreamhackのサイトへのリンク

2024/20240814_1.png

Dreamhack

## AlpacaHack
AlpacaHackへのリンクはこちら

https://alpacahack.com/

AlpacaHackのサイトへのリンク

## 私のCTF環境
- Ubuntu 22.04 LTS

## 前回の記事
2024年8月13日の記事です。

https://yusukekato.jp/html/2024/0813.html

AlpacaHackで始めるCTF入門1:初めてのCTF

## Dreamhackの始め方

### ログイン
まずはDreamhackへアクセスし、アカウントを作成してからログインします。
ログインしないと教育講座は受けられないっぽいです。

https://dreamhack.io/

Dreamhackのサイトへのリンク(再掲)

Dreamhackにログインした後のホーム画面↓

2024/20240814_1.png

Dreamhack(再掲)

### 教育講座を受ける
画面上部にタブがいくつかありますが、今回は勉強したいので「Learn」をクリックします。
Learnタブのページには各ジャンルごとのロードマップが表示されます。

Learnタブのページ↓

2024/20240814_2.png

Learnタブのページ

まずはその中から「Beginners」>「Dream Beginners」を選択します。
すると選択したロードマップのコンテンツが表示されるので
「Introduction」を選んで「Start」をクリックすれば教育講座が開始します。

2024/20240814_3.png

Dream Beginnersのコンテンツ

## Dreamhackの初心者講座
初心者講座のさわり部分だけ箇条書きします。

### 扱う主なジャンル
- Web:webサイトやwebアプリのサーバやクライアントのシステムに関する問題
- Pwnable:プログラムの脆弱性に関する問題
- Reversing:リバースエンジニアリングに関する問題
- Crypto:暗号に関する問題
- Forensics:情報セキュリティにおけるインシデントの調査方法や技術に関する問題
- Professional Programming and Coding(PPC):競技プログラミング
- Misc:その他
- より具体的な領域:Network、kernel、browser、blockchain、etc...

### Wargameとは
- Wargame:意図的に脆弱性が存在するように設計された環境をハッキングするゲーム
- Wargameは実践環境を想定して行うっぽい
- それに対してCTFは競技に特化して問題を設定して競うものっぽい

### flagとは
- ハッキングが成功したことを証明するための文字列
- Dreamhackでは基本的にDH{...}の形式(例外あり)

### 練習問題:Welcome-Beginners
- 問題によっては説明文や参考リンク、ヒントがあったりなかったりする
- 「Request a VM」ボタンを押すと仮想環境のサーバが立つ
- 「Download」ボタンを押すと仮想環境で動いているプログラムが手に入る
- 下記のコマンドを実行してflagを取得

```
$ nc host3.dreamhack.games 23044
Enter "Dreamhack" : Dreamhack
Welcome Beginners!
DH{...flag...}
```

### 便利なエンコードツール
https://tools.dreamhack.games/cyberchef

Dreamhack Tools

https://emn178.github.io/online-tools/base64_encode.html

emn178.github.io/online-tools

https://encoding.tools/

Encoding Tools

### 練習問題:64se64
- 「Download」ボタンを押してzipファイルを取得
- index.htmlを開くとbase64の文字列が見つかるのでエンコード
- Pythonスクリプトが取得できるので実行するとflagが手に入る

2024/20240814_5.png

エンコードの様子

### その他
- Virtual BoxやWSLなどを利用して仮想環境を作るとよい
- コンピュータサイエンスの基礎も大事(バイナリ、ビット演算、文字コード、OSなど)

## おわりに
今日はDreamhackに挑戦してみました。
まだまだ基礎的な話ですが勉強している感じがあって良いです。
教育講座は結構な数がありそうなので、少しずつやってみます。
この調子でCTFに楽しく参加できるレベルまで知識や技術を身につけたいと思います。
それでは、また。

0 comments on commit ce450d3

Please sign in to comment.