The invention provides a vulnerability defense method and system, and the method comprises the steps: carrying out the independent flow monitoring and business volume monitoring of each pre-divided business module based on a pre-constructed neural network model, predicting the future business volume of each business module, and obtaining the predicted business volume corresponding to each business module; when monitoring that the traffic of any business module is abnormal and/or the business volume is higher or lower than the predicted business volume, detecting whether the business module is attacked; and if the attack is detected, determining an attack type, and executing a defense strategy and a counterattack strategy according to the attack type. According to the scheme, the business modules are divided, the neural network model obtained through pre-training is used for carrying out independent flow monitoring and business volume monitoring on each business module, when any business module is attacked, attacks are defended in time, so that the security risk is reduced, and the attacks are defended in a targeted mode according to the attack types. The defense efficiency is improved, and the overall safety level is improved.