Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
SQL Injection
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
kubo-hide-kun
January 27, 2021
Programming
120
0
Share
SQL Injection
kubo-hide-kun
January 27, 2021
More Decks by kubo-hide-kun
See All by kubo-hide-kun
CA BASE NEXT でスクロールに 連動したUIを構築した話
kubo_programmer
1
590
ハイレベルな環境こそが最高である 科学的なお話
kubo_programmer
0
170
IPアドレスとは何か?
kubo_programmer
0
3.7k
クライアント/サーバーシステム
kubo_programmer
0
15k
DHCPサーバ
kubo_programmer
0
3.3k
How to make Readable Slide
kubo_programmer
0
150
AtomicDesignの説明と所感
kubo_programmer
0
1.9k
Moonblock入門
kubo_programmer
3
1.4k
TCP/UDPの違い
kubo_programmer
4
5.9k
Other Decks in Programming
See All in Programming
Programming with a DJ Controller — not vibe coding
m_seki
3
860
Kubernetesを使わない環境にもCloud Nativeなデプロイを実現する / Enabling Cloud Native deployments without the complexity of Kubernetes
linyows
3
410
ついに来た!本格的なマルチクラウド時代の Google Cloud
maroon1st
0
440
サプライチェーン攻撃対策「層を重ねて落ちない壁」を10日間で組み上げた話 #TechLeadConf2026
kashewnuts
1
290
検索設計から 推論設計への重心移動と Recall-First Retrieval
po3rin
5
1.7k
【ディップ|26年新卒研修資料】TDD実装演習
dip_tech
PRO
0
190
Agentic AI & UI: Arcitecture, HITL, Emerging Standards
manfredsteyer
PRO
0
100
エラー処理の温故知新 / history of error handling technic
ryotanakaya
7
1.9k
Import assertionsが消えた日~ECMAScriptの仕様はどう決まり、なぜ覆るのか~
bicstone
2
180
[BalkanRuby 2026] Drop your app/services!
palkan
0
120
ハーネスエンジニアリングにどう向き合うか 〜ルールファイルを超えて開発プロセスを設計する〜 / How to approach harness engineering
rkaga
28
23k
20260514_its_the_context_window_stupid.pdf
heita
0
1k
Featured
See All Featured
Utilizing Notion as your number one productivity tool
mfonobong
4
300
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.7k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.6k
The Curse of the Amulet
leimatthew05
1
12k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
320
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
370
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
140
Fireside Chat
paigeccino
42
3.9k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
199
73k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
65
55k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
300
Transcript
42-ΠϯδΣΫγϣϯ 2021.01.28 - クボ太郎
・SQL について ・SQLインジェクション is 何?
SQL について
データベースとは, テキストやデーアを保存するためのツール 3 σʔλϕʔε σʔλϕʔε ニンジン 文字 (例: 名前) 3
数値 (例: 個数)
JE OBNF QSJDF EBUF ΓΜ͝ δϟΨΠϞ
ۄͶ͗ χϯδϯ レコード ( 横 ) カラム ( 縦 ) データベースは,下の図のような表データを管理している. 表のことを「テーブル」,縦の列のことを「カラム」, 横の列のことを「レコード」と呼ぶ.
データベースに送る命令 = クエリ 3 σʔλϕʔε σʔλϕʔε クエリ データ データベース内の 〇〇というデータを下さい!!
・ SELECT文 ・ INSERT文 ・ UPDATE文 ・ DELETE文 ・・・ ・・・
・・・ ・・・ データを取得する命令 データを追加する命令 データを更新する命令 データを削除する命令 SQLでよく使われるクエリ
SQLインジェクション is 何?
SQLインジェクションとは, Webサイトの入力フォームなどに『SQLクエリを含む文字列』を入力することで, デーアベースを不正操作するサイバー攻撃の一種です. ID: PASSWORD: SQL文を含む文字列を 「ID」 や 「PASSWORD」 に入力
ログイン成功
攻撃事例: 前提条件として,以下のようなSQL文で画面から入力された 「ID」と「パスワード」がデータベースに存在するか確認し、 存在すればログイン成功、存在しなければログイン失敗と判断します。 SELECT id, pass FROM login_user WHERE
id=‘入力されたid’ AND pass=‘入力されたパスワード’; idとpassのデータを 取得する login_userという テーブルから idが ’入力されたid’ と passが ‘入力されたパスワード’ と 一致するもののみという条件
攻撃方法: 「ID」に以下の文字列を入力してログインするだけで不正ログイン可能です。 ※パスワードには何もいれなくて問題ないです。 1’ or ‘1’ = ‘1’; --
なぜ攻撃可能なのか? 「id」の条件が "1" または"1 = 1”という条件になので、結果は必ずtrueです。 そしてSQL文で「--」はコメントアウトを表します。 そのため,条件文「-- AND pass=‘';」はコメントとして扱われ無視されます。
SELECT id, pass FROM login_user WHERE id=‘1’or’1’=‘1’; --’ AND pass=‘ ’;
おしまい !!