Googleã®JSON(ã¢ãã)ã®å é ã«while(1); ãã¤ãçç±
ããã¯ã¯ãã¹ãµã¤ãã»ãªã¯ã¨ã¹ãã»ãã©ã¼ã¸ã§ãªå¯¾çã
éããï¼å ¨ç¶éããï¼
æ»æè ã®ä½æããç½ ãã¼ã¸ã«ã¦JSONã<script src="target.json">ã¿ããã«èªã¿è¾¼ãã§ãã´ãã§ã´ãã§ãããã¨ã§JSONå ã®æ©å¯æ å ±ã«æ»æè ãã¢ã¯ã»ã¹å¯è½ã¨ããã®ã¯åã£ã¦ããã©ãããããã¯ãã¹ãµã¤ãã»ãªã¯ã¨ã¹ãã»ãã©ã¼ã¸ã§ãªãã¨ã¯è¨ããªããç¡çã«ä½ãååãã¤ãã¦å¼ã¶ã¨ããã°ããJSON Hijackingãã¨ããä¿ç§°ãããããã¯åç´ã«ã¯ãã¹ãµã¤ãã§ã®æ å ±æ¼ãããç¨åº¦ã§ãããã
ã¡ãªã¿ã«ãArrayã³ã³ã¹ãã©ã¯ã¿ãObjectã§ã®ã¢ã¯ã»ãµãå®ç¾©ãã¦JSONãJSã¨ãã¦èªã¿è¾¼ãã§å
é¨ã«ã¢ã¯ã»ã¹ããææ³ã¯ãç¾å¨ã®ã¨ããå
¬ã«ããã¦ããã¨ããã§ã¯å¤ãAndroid端æ«ã§ã®ã¿æå¹ã§ããã以å¤ã§ã¯éç¨ãã¾ããã
ãã®ãããã®å¯¾çã¯
ãé常ã«ããã¾ã¨ã¾ã£ã¦ã¾ãã
å人çã«ã¯ãwhile(1); ã«ãããfor(;;); ã«ãããããããã¦ãã¦ãããã®ã§ããããæ¹æ³ã¯ä»ã«æ¹æ³ããªãå ´åããããå¼ãèµ·ããå¯ä½ç¨*1ãææ¡ããä¸ã§è¦æãã¦ä½¿ãã¹ãããããªããããã¦ãã¦ããµã¤ãã®éçºè ã¯è¦ãã¦ããå¿ è¦ãªãã§ãã
ãã¨ãã¤ãã§ã«æ¸ãã¦ããã¨
æªæã®ãããµã¤ãããã¯same-origin policyã§Ajaxã§ã¯ã¢ã¯ã»ã¹ã§ããªãã
ããããAjaxããèªããªãçç±ã¨ãã¦ããã¾ã©ãã¯SOPã§å¶ç´ãåããã®ã§ã¯ãªããCORSã®ä»çµã¿ã«åºã¥ãã¦èªããç¯å²ã決ã¾ãããã§ãã
â» malaããã«ãããã«ããããããã±ã¨è¨ããã¦ãæããªã®ã§ã¡ãã£ã¨ä¿®æ£ã
*1:JSONæä¾å´ã¯ããã§çã¿è¦ãæãããããã©ãã¦ã¼ã¶ã¼å´ã¯ãã©ã¯ã©ã«ãªããããããªã