Dangers: security risks caused by Html tags

Source: Internet
Author: User

 

WWW is one of the most important services on the Internet. It provides a variety of information resources to the customer. An important thing to organize such information resources is Html hypertext language, after the development of the application, other tags such as UBB are generated, but the Html code is used in the end. After research, it is found that even the most secure code (which has already ruled out the common Xss vulnerability) cannot avoid another annoying attack method and use it with less rigorous programs, it may be exploited to generate greater threats.

The [img] labels in script programs such as forums, article systems, and Blog systems are converted Label example to illustrate this neglected security problem! First, let's talk about the process of processing the label and the browser. First, take a look at the following UBB code: [IMG]/UpLoadFiles/NewsPhoto/oveshell.jpg [/IMG], then, the script program is converted to . label

This function is used to embed an image into the current page. The current Forum program has this function in posting and personal portraits. When the browser encounters This Html tag, it will follow the src location
Here is/UpLoadFiles/NewsPhoto/oveshell.jpg to find network resources. When this image is found, it will be accessed, downloaded, and parsed locally,
This image is displayed in the browser. If the resource cannot be found, a Red Cross is displayed, indicating that an error has occurred. Here/UpLoadFiles/NewsPhoto/oveshell.jpg is a normal image.
Slice, so everything goes smoothly, but I don't know if you have thought about it. If this resource is another type of resource, such as a webpage, an eXe file, or an asp page, what will happen if it is not an image file?

Obviously, the answer is that the image shows a red X, our Exe file is not downloaded, And the Html page is not executed. This is a matter of course, because IE or other browsers will parse the obtained resources as images, errors will be generated and red X will be displayed. This may be useless, but if we change the image address
Http: // 127.0.0.1: 88/imgtest/test. asp? What is the form of user = shell? Test. asp contains the following content:

<%
Dim fso, file // defines the Fso object

Const ForReading = 1, ForWriting = 2, ForAppending = 8
Set fso = Server. createObject ("Scripting. FileSystemObject ")
Path = server. mappath ("imgtest.txt") // open the same directory imgtest.txt
Set file = fso. opentextfile (path, ForAppending, TRUE)
File. write ("someone:") // write content
File. write (request. Servervariables ("QUERY_STRING "))
File. write vbCrLf
File. close
Set file = nothing
Set fso = nothing
%>

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.