この記事はPHP Advent Calendar 2012の20日目です。昨日はTakayuki Miwaさんの「ComposerとHerokuではじめる!PHPクラウド生活」でした。 以前、「『よくわかるPHPの教科書』のSQLインジェクション脆弱性」というタイトルで、同書のSQLインジェクション脆弱性について説明しましたが、SQLインジェクション脆弱性のあるSQL文がDELETE FROMだったので、先のエントリでは、脆弱性の悪用方法としてはデータ(ミニブログの記事)の削除を説明しました。簡単に「全ての記事を削除できる」ので重大な脆弱性ではありますが、個人情報などが漏洩する例ではありませんでした。 このエントリでは、ブラインドSQLインジェクションという技法により、DELETE FROM文の脆弱性から、個人情報を得る手法を説明します。 脆弱性のおさらい ここで、脆弱性のおさらいをしまし
このエントリでは、ネット上で「SQLインジェクション対策」でGoogle検索した結果の上位15エントリを検証した結果を報告します。 SQLインジェクション脆弱性の対策は、既に「安全なSQLの呼び出し方」にファイナルアンサー(後述)を示していますが、まだこの文書を知らない人が多いだろうことと、やや上級者向けの文書であることから、まだ十分に実践されてはいないと思います。 この状況で、セキュリティのことをよく知らない人がSQLインジェクション対策しようとした場合の行動を予測してみると、かなりの割合の人がGoogle等で検索して対処方法を調べると思われます。そこで、以下のURLでSQLインジェクション対策方法を検索した結果の上位のエントリを検証してみようと思い立ちました。 http://www.google.co.jp/search?q=SQLインジェクション対策 どこまで調べるかですが、以前NH
テーブルのJOINが苦手でしたが、この例を思いついてからは、すっきりくっきり理解できるようになりました。むしろ頭から離れません……。 ※ INNER、OUTERは飾り。省略できる。 INNER JOIN → JOIN LEFT OUTER JOIN → LEFT JOIN RIGHT OUTER JOIN → RIGHT JOIN ※ ON ...=... をまとめて USING(属性) と書ける。 ※ 何で結合するか言うまでもない時は、NATURALを指定すると勝手にJOINしてくれる。NATURALにJOINして……。 ※ WHEREは結合した結果に作用する。 ※ 現実には上図のように1対1で結合しません。 ※ おまけ。CROSS JOIN。 こんなの使いません。 ブクマ用画像。
My other half says I’m losing it. But I think that as an enthusiast kernel developer she doesn’t have the right to criticize people. (“I like user space better!” – she exclaims upon reading this). Shown below is a (single query) SQL-generated pie chart. I will walk through the steps towards making this happen, and conclude with what, I hope you’ll agree, are real-world, useful usage samples. +----
This is a archive of older and discontinued projects and experiments I worked on. Test Everything (2007 — 2020) A meta testing tool for your website. My blog (2006 — 2011) From 2006 till 2008 I wrote articles in my german blog named “Lost in programming”. In 2011 I removed the remaining old articles from my homepage. Free icon set (2007) Years ago I made a free icon set from freely available stock
All of Percona’s open source software products, in one place, to download as much or as little as you need.
→ ‘twowaysql’ What TwoWaySQL is a Template Engine for SQL. With TwoWaySQL, you can bind variables to SQL or modify SQL conditionally and run and preview TwoWaySQL-style SQL by tools like pgAdmin3, since the SQL is still valid. see more docs Installing (sudo) gem install twowaysql The basics see docs Demonstration of usage simple case # given SQL string with TwoWaySQL comments sql = "SELECT * FROM
Prev Next What is a vector database? Should you run your database on premises or in the cloud? Free Download What is a cloud database? An in-depth cloud DBMS guide A cloud database is an organized and managed collection of data in an IT system that resides on a public, private or hybrid cloud computing platform. This comprehensive guide to cloud databases further explains what they are, how they w
Click HERE to view desktop version/add-in version for ssms/vs of SQL Pretty Printer. Click HERE to try FREE ONLINE SQL beautifier, also known as Instant SQL Formatter. Instant SQL Formatter is a free online sql tidy tool, actually, it not only can beautify your sql but also can turn your formatted sql into html code, so you can post coloured sql code in your blog, forum,wiki and any website easily
【関連記事】 本内容についてのアップデート記事を公開しています。あわせてご確認ください(編集部) Security&Trustウォッチ(60) 今夜こそわかる安全なSQLの呼び出し方 ~ 高木浩光氏に聞いてみた http://www.atmarkit.co.jp/fsecurity/column/ueno/60.html Webアプリケーションに対する攻撃手法の1つであるSQLインジェクションの存在は、かなり広く知られるようになった。しかし、その対策はまだ本当に理解されていないように思える。フォームから渡された値の特殊文字をエスケープしたり、PHPのmagic_quotes_gpcといった自動エスケープ機能をオンにするだけで対策したつもりになっていないだろうか。 基本はもちろん、セカンドオーダーSQLインジェクションやマルチバイト文字を利用したSQLインジェクションの攻撃パターンや、その対
What's new? 25.9.2008 Version 2.2 SQLite storage New datatypes New translations 18.7.2008 Version 2.1.1 Fixes in MySQL XSLT Minor improvements 28.6.2008 Version 2.1 New languages Dynamic window title "note" datatype attribute 1.4.2008 Version 2.0.1 Fixed AUTOINCREMENT for Foreign Keys Minimap visual aesthetic changes 28.3.2008 Version 2.0 ! Thanks to Mirko Buffoni for numerous consultations and su
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く