爆発的な勢いで普及しているAndroidですが、OSやアプリケーションのセキュリティに目を向けると、脆弱性を突いた端末のroot化やマルウエアによる個人情報の流出、脆弱なアプリケーションによるセキュリティ侵害など、様々な問題が明らかになっています。ユーザーが安心してAndroid端末を利用できるように、開発者は一体何に気を付ければ良いのでしょうか。一言でAndroidのセキュリティを担保するといっても、様々なことを考えなくてはなりません。
このエントリでは、脆弱性対処における例外処理について、奥一穂氏(@kazuho)との会話から私が学んだことを共有いたします。セキュアプログラミングの心得として、異常が起これば直ちにプログラムを終了することが推奨される場合がありますが、必ずしもそうではないというのが結論です。 はじめに Webアプリケーションの脆弱性対策では、脆弱性が発生するのはデータを使うところであるので、データを使う際の適切なエスケープ処理などで対処するのがよいと言われます。しかし、処理内容によってはエスケープができない場合もあり、その場合の対処についてはまだ定説がないと考えます。 エスケープができない場合の例としては、以下があります。 SQLの数値リテラルを構成する際に、入力に数値以外の文字が入っていた メール送信しようとしたが、メールアドレスに改行文字が入っていた 入力されたURLにリダイレクトしようとしたところ、U
高木浩光さんの「サニタイズ言うなキャンペーン」 という言葉自体はずいぶん前から存在したのだが、 続・「サニタイズ言うなキャンペーン」とはにて高木さん自身がいくつも誤解の例を挙げているように、 そしてまた最近も 駄目な技術文書の見分け方 その1にて「まだわからんのかね」と言われているように、 「わかりにくい」概念なんだろうとは思う。 そこで、僭越ながら、「サニタイズ言うなキャンペーン」について、 私なりの解釈を書いてみようと思う。 もっともこれが正解であるという保証はないのだが、 間違っていたらどなたかツッコミいただけることを期待しています(_o_) そもそも何のせいで「エスケープ」しなければならないのか たとえば住所氏名を登録させるWebアプリケーションは珍しいものではないと思う。 そこで、私が「Taro&Jiro's castle サウスポール」 とかいう恥ずかしい名前のマンション(?)
以下は、WEBプログラマー用のWEB脆弱性の基礎知識の一覧です。 WEBプログラマーの人はこれを読めばWEB脆弱性の基礎をマスターしてWEBプログラムを書くことができるようになっているかもです。 また、WEB脆弱性の簡易リファレンスとしても少し利用できるかもしれません。 WEBアプリケーションを開発するには、開発要件書やプログラム仕様書通りに開発すれば良いというわけにはいきません。 そう、WEB脆弱性を狙う悪意のユーザにも対処しないといけないのです。 今回、WEBアプリケーションを開発にあたってのWEB脆弱性を、以下の一覧にまとめてみました。 このまとめがWEBアプリケーション開発の参考になれば幸いです。 インジェクション クロスサイト・スクリプティング セッション・ハイジャック アクセス制御や認可制御の欠落 ディレクトリ・トラバーサル(Directory Traversal) CSRF(
初心者はPHPで脆弱なウェブアプリをどんどん量産すべし ↑のブックマーク うん。増田くんはいつもいいこと書くね! ブックマークの方には 危険だとか迷惑だとか踏み台だとか色々かいてあるけれど(というか踏み台ってなんだろ?) そんなに大切な個人情報をたくさん扱ってるサイトなんてどれだけあるかな。 みんなそういうサービスつくってるの? なんかすごいね。 ぼくの使っている範囲だと、(提供側が気をつけていないと) 本当にまずいのは銀行と証券とカード会社のような、お金のからむサービスくらいだよ。 もちろん、他にメール内容だとか、購読しているフィードだとか、知られたくない個人情報なんてのは、人によってたくさんあるよね。 だけど、例えばぼくがメールサービス作りましたなんて言ったら誰か使う? それか無名の団体だったらどうかな。それで大切なメールやりとりしちゃうの? そう。そもそも、利用者もそれほどバカじゃな
http://www.rubyist.net/~matz/20080126.html#p04 趣味でやってるプログラミング初心者の立場で言わせてもらう。だいたいな、あんたらプロのプログラマが小難しい顔してセキュリティセキュリティ言うもんだから初心者プログラマのセキュリティ意識がまったく向上しないばかりか、よけいに低下するんだよ。ごちゃごちゃ言われたり叩かれるのはイヤだけど、眼前の問題はプログラムで解決したいってヤツは耳塞いで黙ってPHPでやりたいようにやるんだよ。何が「楽しいRuby」だよ。「Webアプリケーションをなめるな」ってその時点でもう全然楽しくねーだろが。 それでこれだよ。 http://d.hatena.ne.jp/essa/20080130/p1 もう萎縮萎縮!初心者超萎縮ですよ。「あーセンコーうぜー。隠れてタバコ吸おう」って高校生の心境だよ。難しい顔して訳知り顔でかっこつけ
Attacking PHP - Matzにっき(2008-01-26) まつもとさんのこのエントリから凄い騒ぎになっているようだけど、ここで一番重要なことは、PHPやRubyがどうのこうのでなくて Webアプリケーションをなめるな こっちの方だと思う。 「初心者にやさしい言語(技術、方法論)の開発」→「本質的な問題の隠蔽と関係者の人口増加の同時進行」→「問題の拡散」というパターンはこれまで何度も繰り返されてきたことだ。 たとえば、VisualBasicやAccessやExcelのユーザが増えはじめた時は、「DBをなめるな」と私は思った。データベースというものは、しっかり業務分析をした上で、論理設計と物理設計をきちんとしないと、最後には破綻する。イージーなツールにも使い道はあるけど、明かに想定を超えた使い方で業務ソフトを作ってしまい、つぎはぎだらけになって収拾がつかなくなる例を何度も見てきた
<< 2008/01/ 1 1. 年賀状 2. ゴビウス 3. [Ruby] ZSFA -- Rails Is A Ghetto 2 1. 新年会 3 4 1. The Mythical 5% 5 6 7 8 1. [言語] Substroke Design Dump 2. [言語] A programming language cannot be better without being unintuitive 3. [OSS] McAfee throws some FUD at the GPL - The INQUIRER 9 1. [言語] Well, I'm Back: String Theory 2. [言語] StringRepresentations - The Larceny Project - Trac 10 1. [Ruby] マルチVMでRubyを並列化、サンと東大が
CWE is a Software Assurance strategic initiative sponsored by the National Cyber Security Division of the U.S. Department of Homeland Security. CWE - 2010 CWE/SANS Top 25 Most Dangerous Programming Errorsにおいて脆弱性の原因となる危険なプログラミングエラー25が発表された。開発者にセキュリティ問題の原因となるプログラミングに関する注意を促し、実際にソフトウェアが動作する前の段階で問題を発見し対処できるようにすることを目指したもの。2009年に発表されたリストの更新版にあたり、内容の多くが更新されている。2009年版を使っていた場合には、今回発表された2010年版を再度検討する価値がある。
先日、AmebaなうがCSRFという非常にポピュラーな脆弱性を披露したかと思ったら、ここ数日はセブンネットショッピングでXSSの脆弱性と、ID推測による他ユーザの個人情報閲覧の問題が発生しているという噂が流れています。 ユーザの情報を預かっておきながら、基本的なセキュリティの対策もできていないというのは、銀行に例えるなら、お金を預けようとした時に「お金は預かります。ちゃんと保管します。でも警備はあまりしないので盗まれたらスイマセン」と言われるようなものだと思う。 警備に穴があったというのではなく、まともに警備してませんでした、というのはさすがにありえないことです。 そこで、野良WEBプログラマである私が知っている脆弱性を列挙してみた。 私はプログラマであってセキュリティの専門家ではないです。しかも今年の春辺りからずっと外向けのWEBプログラムは組んでません。 その人間が知っているものを並べ
これまで2回にわたってWebアプリケーションにおける入力値検証とセキュリティ対策の関係を説明してきた。入力値検証はセキュリティ上の根本的対策ではないが,保険的な対策として効果が期待でき,特に制御コードや不正な文字エンコーディングによる攻撃対策には有効であることを説明した。 今回は,Webアプリケーション開発によく使われる4種類の言語(Perl,PHP,Java,ASP.NET)に関して,入力時処理の具体例を示す。ここで取り上げる「入力時処理」とは以下の内容を含んでいる。 文字エンコーディングの検証文字エンコーディングの変換入力値検証 Perlによる実装の方針 Perl言語はバージョン5.8から内部文字エンコーディングとしてUTF-8をサポートし,文字単位での日本語処理が可能だ。文字エンコーディング処理にはEncodeモジュールを使用する。入力値検証には正規表現を用いるのが便利だ。 ■文字エ
何故かあたり前にならない文字エンコーディングバリデーション | yohgaki's blog ってあるように、いまいち文字コードの不正な判定による危険性ってのが分かってない。 SJISの問題は、(2/3)SQLインジェクションを根絶!セキュア開発の極意 - 第5回■注目される文字コードのセキュリティ問題:ITproの記事がわかりやすかった。 というか、やっぱりPHP使ってると誰でも一度は「なんじゃこの『¥』は?」って思うもんなんで。 なるほど、確かに↓の図のように「あるバイト」が2つの意味を持つっていう文字コード形態はやばいんだなと。 EUC-JPはそんなことはしないで、1つのバイトには1つの意味しか取らせない。 だけど、これでも文字化けが起こることがある。経験的には、「マルチバイトをXX文字で切り落としたい」とかやった場合。ちゃんと文字コードを判定してくれるPHPでいえばmb_subst
ストーリー by hylom 2009年01月14日 17時04分 やはりよく言われている問題が多い、 部門より CWEとSANSが共同で「最も危険なプログラミングエラーTop 25」を取りまとめ、発表した。 このリストはSymantecやMicrosoft、米国国土安全保障省の国家サイバーセキュリティ部門、また日本の情報処理推進機構(IPA)など、国際的かつ多岐に渡る組織の協力を得て作成された。パフォーマンス上の問題やセキュリティ上の脆弱性、またサイバー犯罪の原因となり得るプログラミングエラーのうち、特に頻度と危険性の高いとされるものが25点挙げられている。 エラーは大きく「コンポーネント間のコネクションが適切に保護されていない」「危険なリソースマネジメント」「不備のある防衛策」の3種類に分類され、それぞれのエラーには簡単な説明と対処法などが記述されている。挙げられているエラーは「入力デ
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く