Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
SQLi Detection by Deep Learning
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
kaseyuki
February 26, 2024
Technology
46
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
SQLi Detection by Deep Learning
kaseyuki
February 26, 2024
Other Decks in Technology
See All in Technology
ストレスなくAIと付き合いたい!こんなときどうしてる?
namiki64
3
490
オントロジーって 結局なにもの? AI エージェントに「意味」を渡す知識設計の話
greenmidori
0
180
Getting Started with Google Antigravity
glaforge
0
300
AI コーディングと人間の認知スループット / CTO Night & Day 2026 Morning Session / AI Coding and Human Cognitive Throughput
prog893
4
1k
実践! SRE × AI - ABEMA における AIOps -
tetsuya28
8
3.1k
事業成長とデータ活用を止めないためのマネジメントへ挑戦
hiracky16
0
390
PHPカンファレンス関西の招待状 / Invitation to PHP Conference Kansai
ykanoh
0
110
夫婦で子育てするための育児標準化
codmoninc
PRO
0
330
Local CI × GitHub Actions
gogutan
2
190
DevelopersIO 2026 知識の地図を描く ─ オントロジーとは何か?
ishikawa_satoru
1
1.7k
Webの常識が通じないHTMLメールのダークモード
teamlab
PRO
0
120
スキマバイトという雇用形態は存在しないので、雇用期間1日のアルバイト契約を事業者とワーカーが結ぶ手続きを支えるのがタイミーなんです
akitoshiga
0
200
Featured
See All Featured
The Pragmatic Product Professional
lauravandoore
37
7.5k
The SEO Collaboration Effect
kristinabergwall1
1
590
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
730
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
570
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
2
6.3k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Building a Scalable Design System with Sketch
lauravandoore
464
34k
Mobile First: as difficult as doing things right
swwweet
225
10k
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.2k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.8k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
56
3.5k
Transcript
はじめに 0
SQLインジェクション SQLを変更し、データベースを不正に操作 Webアプリケーションコードに脆弱性があると 1
深層学習を用いたSQLi攻撃検出モデル 文字列 悪意のある文字列 正常な文字列 検出モデル 2
Web Application Firewall (WAF) 3
モデルを用いることによる問題 Webサービスの特性 懸念される問題 誤った検出結果 快適性の悪化 運用費用 様々な入力 快適性 大量のリクエスト 4
アプローチ Webサービスの特性に着目してモデルを比較 パラメータ数 検出性能 推論速度 5
検出モデルのアーキテクチャ BiLSTM BERT Elastic Pooling CNN(EP-CNN) 異なる文字数の文字列でも文字の切り捨てを行わずCNNで処理 順方向と逆方向のコンテキストを考慮するニューラルネットワーク 事前学習済みモデルをファインチューニングによりSQLi攻撃の検出に特化 6
大規模言語モデル(LLM) 7 プロンプト 回答 チャット形式 LLM
プロンプトエンジニアリング • タスクの説明 • 出力の形式 • Fewshot学習 8
使用したLLM Llama2-7B オープンLLM Mistral-7B オープンLLM Web APIを介して利用 GPT3.5とGPT4 9
実験準備 - データセット 10
実験準備 - データ 11 1' where 1557 = 1557 陽性
1 " Net orders fell 26 aircraft , 83 " 陰性 0 ラベル 例
実験 - モデルの処理の流れ 12 クエリ 予測 ラベル 比較 モデル
実験 - 検出性能の評価に用いる指標 Precision 陽性と予測したときの信頼度を評価 Recall 陽性をはずさないことを評価 F-measure PresicionとRecallをあわせたものを評価 Accuracy
全体の性能を評価 13
実験結果 - 各モデルの検出性能 ◯ GPT3.5 GPT4 EP-CNN BiLSTM Llama2-7B Mistral-7B
△ ✕ BERT 14
実験結果 - 推論速度とパラメータ数 EP-CNN BiLSTM BERT ◯ GPT3.5 GPT4 Llama2-7B
Mistral-7B ✕ 15
結論 ◯ BERT GPT3.5 GPT4 EP-CNN BiLSTM Llama2-7B Mistral-7B △
✕ 16
まとめ 17 Webサービスの特徴に着目して深層学習によるモデルを比較した 実験の結果、BERTを使ったモデルが最適だと分かった