Distributed Denial of Service (DDoS) attacks constitute one of the major threats and among the hardest security problems in today’s internet. Defense against these attacks is complicated by spoofed source IP addresses, which gives us a tough task to find out the packets origin. So this paper represents a solution for a DDoS attack. We’ll be using wireshark tool to analyze the network traffic of any interface and find malicious activity by hackers. An algorithm is written at the server side so that if any malicious user sends asynchronous requests at a rate of (>=30 requests per second) then a Visual Basic script is sent to the malicious user. The Visual basic script consists of code encapsulated, allowing system administrators to generate and manage computers with error handling, sub routines etc. This .vbs scripts are made to auto run on the computer, thus making a particular service unavailable to the malicious user. Hereby, stopping the server from partial shutdown or preventing it from DDoS attack.