Late-night topic: How did these twelve lines of code make the browser explode? |

Source: Internet
Author: User

Late-night topic: How did these twelve lines of code make the browser explode? |

 

 

Cause

Today, we found Cyber Security@ Cyber _ secThe Tweets let people shine:

Crash firefox, chrome, safari browsers, and also restart iphone using this javascript code. # dos # 0day # exploit // use the following JavaScript code to crash firefox, chrome, and safari, and restart the iphone.

 

Continue to dig deep into IT Security Tweets on Twitter? @ F1r3h4nd:

Crash your friend's browser and restart Iphone with a link which has this script: # 0day // send a link with the following script to your friends, which can Crash your friend's browser, and restart the Iphone.

 

The complete HTML code is as follows:

<Script> var total = ""; for (var I = 0; I <1000000; I ++) {total = total + I. toString (); history. pushState (0, 0, total) ;}</script> 

Demo :( tip: Save the editing tasks in other windows of the browser)

Www.0xroot.cn/demo.html (click it and you will not be pregnant again !)

What will happen next?

After clicking open, my status is as follows:

 

 

If you are a PC-end user, after clicking the link, the computer's CPU memory is very likely to go crazy until the browser crashes!

If you are a mobile client (Android or iPhone) user, your browser will crash after clicking the link! Clicking a link on Weibo or the client will also crash. As for the restart of the iPhone mentioned in the tweets, this phenomenon does not appear.Fixed at: After the link was opened on iPhone Safari, the phone was canceled and restarted !...

Thoughts

Is this a Bug or 0 day? Why does this happen? How to implement it?

Which of the following are interesting scenarios? (Let me start with: When an MITM man-in-the-middle attack is executed, this section of js can be injected to spoof the hacker. And I understand it all ...)

You are welcome to express your views in the comments.

 

Weibo comment/discussion Extraction

Pregnant... interesting... terrible... I am already suffering from a lot of attacks) ten seconds after Firefox crashes, a pop-up window prompts that the script has no response and can be stopped. Is it history stack overflow? Yes. get √ JS is the best language in the world! Why is hist. pushState used? The computer is restarting. Why can't I just hire me? There is no problem with Chrome stealth mode.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.