Last active
December 14, 2015 07:49
-
-
Save ritou/5053810 to your computer and use it in GitHub Desktop.
Revisions
-
ritou revised this gist
Feb 28, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,7 +3,7 @@ これの話です。 [http://togetter.com/li/463503](http://togetter.com/li/463503) (追記 : この考察ではiframeでTwitterの認可URL指定してもX-Frame-Options設定されてるやんけ問題が未解決と思ったらなにやら更新されてたのでもう様子見) ## 前提条件 -
ritou revised this gist
Feb 28, 2013 . 1 changed file with 3 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,6 +3,8 @@ これの話です。 [http://togetter.com/li/463503](http://togetter.com/li/463503) (追記 : この考察ではiframeでTwitterの認可URL指定してもX-Frame-Options設定されてるやんけ問題が未解決) ## 前提条件 あくまでこれ前提で考えてます。間違ってたらごめんなさいね。 @@ -22,6 +24,7 @@ * Request Tokenを取得。このとき、設定でcallbackを指定してるアプリケーションはそれ以外のoauth_callbackに任意のドメインを指定できちゃう(←アカン) [POST oauth/request_token](https://dev.twitter.com/docs/api/1/post/oauth/request_token) * 認可画面を開く。キャプチャ画像にあったとおり、oauth/authenticateを使う [GET oauth/authenticate](https://dev.twitter.com/docs/api/1/get/oauth/authenticate) * 一度でも認可したことがあればスキップしてoauth_callbackにoauth_verifierが戻る。あとはどこまででも行ける * ところでiframeあたりはどうやった? ってことですね。 -
ritou revised this gist
Feb 28, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -19,7 +19,7 @@ ## これ作った人がやっていること * 有名Twitter ClientとかのConsumer Key/Secretを持ってる * Request Tokenを取得。このとき、設定でcallbackを指定してるアプリケーションはそれ以外のoauth_callbackに任意のドメインを指定できちゃう(←アカン) [POST oauth/request_token](https://dev.twitter.com/docs/api/1/post/oauth/request_token) * 認可画面を開く。キャプチャ画像にあったとおり、oauth/authenticateを使う [GET oauth/authenticate](https://dev.twitter.com/docs/api/1/get/oauth/authenticate) * 一度でも認可したことがあればスキップしてoauth_callbackにoauth_verifierが戻る。あとはどこまででも行ける -
ritou revised this gist
Feb 28, 2013 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -12,8 +12,8 @@ ## DMのリンク先で行われているらしいこと * iframeがいっぱい開かれた * 有名なTwitter Clientの認可画面だ : (本家の認可URLもしくはCunsumer Key/Secretを知っててRequest Token取得できた?) * 画面を開くだけで自動認証だ : (oauth_callbackを自分のサーバーのURLに?) * DM送信はあとからしれっとやるらしい? ## これ作った人がやっていること -
ritou revised this gist
Feb 28, 2013 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,6 +5,8 @@ ## 前提条件 あくまでこれ前提で考えてます。間違ってたらごめんなさいね。 * モバイルアプリの通信盗聴や某市長の手違いみたいな感じでConsumer Key/Secretを入手したやつがいる ## DMのリンク先で行われているらしいこと -
ritou created this gist
Feb 28, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,33 @@ # DM踏んだだけでアレな件はTwitterのOAuth実装がク○だと思う これの話です。 [http://togetter.com/li/463503](http://togetter.com/li/463503) ## 前提条件 * モバイルアプリの通信盗聴や某市長の手違いみたいな感じでConsumer Key/Secretを入手したやつがいる ## DMのリンク先で行われているらしいこと * iframeがいっぱい開かれた * 有名なTwitter Clientの認可画面だ : Request Tokenが取得できる時点でCunsumer Key/Secretが漏えいしてる * 画面を開くだけで自動認証だ * DM送信はあとからしれっとやるらしい? ## これ作った人がやっていること * 有名Twitter ClientとかのConsumer Key/Secretを持ってる * Request Tokenを取得。このとき、oauth_callbackに自分のドメインを指定できちゃう(←アカン) [POST oauth/request_token](https://dev.twitter.com/docs/api/1/post/oauth/request_token) * 認可画面を開く。キャプチャ画像にあったとおり、oauth/authenticateを使う [GET oauth/authenticate](https://dev.twitter.com/docs/api/1/get/oauth/authenticate) * 一度でも認可したことがあればスキップしてoauth_callbackにoauth_verifierが戻る。あとはどこまででも行ける ってことですね。 * 有名どころを並べればまぁどれかは認可してる的発想 * ○○だとDM読めないじゃんってTweetがあったけど、READ/WRITEならDM送れる ## 考察 * Consumer Key/Secretは漏れる * Twitterがoauth_callbackに意図しないURLを設定できるのが原因。世の中の実装を見て、アプリケーション単位でホワイトリスト的な制限をすべき * ちなみにOAuth 1.0はオワコンなのでTwitterさんはOAuth 2.0頑張って