Security is one of the most important problems to be considered in the Wireless Local Area Networks (WLANs). Several security techniques were initiated to solve the available security bugs. In this study, we propose to design a detection and defense mechanism against DDoS attacks. Initially GIDA module is deployed, so that DDoS attack is detected using the game theory decision model in the Access Point (AP). A Master Session Key (MSK) is calculated and a hash function is created for security. For the authentication and association of frames a client puzzle based defense mechanism is used in the AP. Here the client solves a puzzle which has been send by the AP. In the next phase, de-authentication or disassociation of frames of AP or client can be protected by the random bit authentication mechanism. It inserts the current 3-bit unit into the unused bit positions of each frame and then advances the index to point to the next unit. The respective frames can be protected by the hash function and master session key. This framework provides a complete solution for the DDoS attacks targeted at both clients and AP.