Detailed Web server security attack and protection mechanism

Web服务器攻击常利用Web服务器软件和配置中的漏洞,针对这些漏洞最佳做法是遵循一些方法搭建并运行Web服务器,本文详解了Web服务器保护的一些方法。
Web server attacks often use Web server software and configuration vulnerabilities, for these vulnerabilities it is best to follow some methods to build and run the Web server, this paper detailed the method of Web server protection.
Web安全分为两大类:

请看好互联网“后门”,监控就意味着安全。每当各国政府想要获取监控公民的新权力时,就会想到这个理由。
Web security is divided into two categories:
· Web服务器的安全性(Web服务器本身安全和软件配置)。
Web server security (Web server security and software configuration).
· Web应用程序的安全性(在Web服务器上运行的Java、 ActiveX、PHP、ASP代码的安全)。
Web application security (security on Web servers running Java, ActiveX, PHP, ASP code).
Web服务器面临的攻击
Web server attacks
Web服务器攻击利用Web服务器软件和配置中常见的漏洞。这些漏洞包括:

一级注册建筑师被取消 盘点哪些职业资格证书值得一掷千金【图】

Web server attacks using Web server software and configuration common vulnerabilities. These vulnerabilities include:
· 缓冲区溢出
Buffer overflow
· 文件目录遍历
File directory traversal
· 脚本权限
Script permissions
· 文件目录浏览
原标题:国家拟实施关键信息基础设施保护制度 针对网络安全的国…

File directory browsing
· Web服务器软件默认安装的示例代码
Web server software default installation sample code
· Web服务器上运行的其他软件中的漏洞,例如SQL数据库软件
• other vulnerabilities in other software running on the Web server, such as SQL database software
让我们对上诉漏洞依个进行深入地探讨。
Let us have a deep discussion on the appeal loophole.
1.缓冲区溢出
1 buffer overflow
缓冲区溢出允许恶意代码注入到应用程序,它损坏应用程序的堆栈——内存中存储应用程序代码的一个地方——并用不同的代码代替原始代码的一部分来实现攻击者的目的,例如运行特洛伊木马程序或远程控制应用程序。以下是缓冲区溢出漏洞的一个简单示例代码,使用C语言编写:

[股东会]康大食品:於二零一七年一月十二日举行之特别股东大会投…

Buffer overflow is allowed to inject malicious code into the application, a place where it damaged the application’s stack storage application code in memory part and use different code instead of the original code to achieve the purpose of running the Troy attacker, such as Trojan or remote control application. The following is a buffer overflow vulnerability of a simple example code, the use of C language:
char aTmp[100];
ATmp[100] char;
scanf(“%s”,aTmp);
Scanf (%s, aTmp);
在第一行中,程序员声明一个长度为100的数组aTmp。在第二行中,scanf方法从控制台读取数据存到aTmp数组。代码不会检查%s 变量是否能够容纳输入数据的大小。因为程序员编码过程不对输入字符串的大小进行检查,如果给定的输入超过100个字符,就会造成缓冲区溢出。一个精心构造构的输入中可能包含汇编代码,这部分汇编代码能够获得源程序一样的运行权限。
In the first row, the programmer declares an array of length 100 aTmp. In the second row, the scanf method reads data from the console to the aTmp array. The code does not check whether the%s variable can accommodate the size of the input data. Because the programmer’s encoding process does not check the size of the input string, if the given input exceeds 100 characters, the buffer overflow. An elaborate structure of the input may contain assembly code, this part of the assembly code can be run as the source code.
2.目录遍历
2 directory traversal
目录遍历是指访问到了不是原先设想或允许的目录(或文件夹)。例如,微软IIS Web站点的默认文件夹为C:inetpub,攻击者可使用的目录遍历漏洞,在该文件夹之外去读取他们本不该访问的文件。详细来说,假如有一个网址为“www.bad.com”的网站,其服务器代码中包含目录遍历漏洞。攻击者通过输入以下URL就可以利用该漏洞:
Directory traversal refers to a directory (or folder) that was not originally conceived or allowed. For example, the default folder for Microsoft IIS Web site is C:inetpub, the attacker can use the directory traversal vulnerabilities, in addition to the folder to read the files they should not have access. In detail, if there is a web site for www.bad.com web site, the server code contains directory traversal vulnerability. Attackers can exploit the vulnerability by typing the following URL:
http://www.bad.com/../autoexec.bat
Http:\/\/www.bad.com\/..\/autoexec.bat
URL中的“…/”告诉服务器上溯一个目录,也就是“C:”目录(Web 服务器可以将斜杠转换为反斜杠)。所以如果IIS服务器默认目录为“c:inetpub”,那么该URL会转到“C:”目录,攻击者将能够看到“c:autoexec.bat”文件。除非将服务器配置好了避免目录遍历,不然所有目录可能都是可访问的。这种情况下,Web服务器将显示“autoexec.bat”文件的内容,或者攻击者选择的任何其他文件。
URL … \/ tell the server back to a directory, which is the C: directory (the Web server can be converted to slash backslash). So if the default directory for the IIS server is c:inetpub, then the URL will go to the C: directory, and the attacker will be able to see the c:autoexec.bat file. Unless the server is configured to avoid directory traversal, all directories may be accessible. In this case, the Web server will display the contents of the autoexec.bat file, or any other file selected by the attacker.
值得注意的是:我们已经使用 IIS 作为示例;但是,此漏洞的利用不是针对IIS服务器的,在其他的Web 服务器上也有目录遍历漏洞。
It is worth noting that: we have used IIS as an example; however, the use of this vulnerability is not for the IIS server, in other Web server directory traversal vulnerability.
侵删
Invade delete
长按二维码关注我们
Long by the two-dimensional code to pay attention to us
微信扫一扫关注该公众号
Sweep the concern of the public, WeChat

智能手机设备的大量使用使得商业用户和个人用户的界限越来越模糊,而这将催生新的IT安全。

猜您喜欢

土耳其能源部部长:过去两天里已经采取措施加强关键能源、天然气…
企业安全意识之歌
针对全员的ISO14001体系在线动画培训问世
2017年春运大幕拉开
THOUSANDNEWS KEITHREDING
互联网金融您不知道的肮胀交易