Web Security Second article--The Star of Tomorrow introduction to HTML5 safety issues

Source: Internet
Author: User

I. Cors area issues:

1, Cors Introduction Please refer to: cross-domain resource sharing introduction

2, HTML5 in the XHR2 level call can open a socket connection, send an HTTP request, interestingly, upload the file here is exactly the Multi-part/form-data exactly meet the requirements, do not need preflight, And can take such authentication information as cookies. The perfect bypass of all cross-domain sharing defense mechanisms.

1<script Language=javascript type=text/javascript>2 Functiongetme ()3 {4 varhttp;5http=newxmlhttprequest ();6Http.open (post,http://192.168.100.12/json/jservice.ashx,true);7Http.setrequestheader (Content-type,text/plain);8http.withcredentials=true;9Http.onreadystatechange=function()Ten { One if(http.readystate==4){ AVarresponse=Http.responsetext; -document.getElementById (Result). innerhtml=response; - } the } -Http.sent ({\id\:2,\method\:\getproduct\,\params\:{\id\:2}}); - }getme (); -</script>

Second, new tags, new attributes of the XSS problem:

1, mainly for the filter situation, the new label and properties may not be enough to filter.

2, Tags: media: "Audio, video"; Canvas: "Getimagedata"; menu;embed; buttons; commands formcontrol: "Keys"

3, other categories: Form,submit,autofocus,sandbox,manifest,rel, etc.; new Rich text scripting language, etc.;

Third, Web Storage and DOM information extraction:

1, Locolstorage object will persist in the Web data on the local, can be read directly through JS. Important sensitive data should be stored in the session storage.

1 <script>2if(localstorage.length) {    3           for inch localstorage) {    4                   console.log (i);     5                    Console.log (Localstorage.getitem (i));     6          }    7} 8 </script>   

Iv. Webworker attacks:

1. The main botnet, where the attacker wrote a piece of code where the code could be inserted, is constantly opening webworker to engage in malicious activity, and the Web page executes malicious code whenever it is accessed. Will trigger the injection of DDoS, send spam and so on, the user's browser into a broiler.

2, Webworker can childhood over POSTMESSAGEAPI to and the main thread communication, if not done filtering and verification, the word can read and write to the DOM data.

3. Common attack attack: Ravan

V. WebSocket attack:

1, become backdoor, port scan, botnet, sniff and so on

Js_recon is a JS-based network detection tool that performs network and port scans using Wensocket.

Six: The new API still needs to be careful and carefully analyze whether there is a safe wind direction.

Web Security Second article--The Star of Tomorrow introduction to HTML5 safety issues

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.