Abstract:
To address the problem that JavaScript malicious code detection models based on deep learning are weak against attacks, a combined model DQN-CNN for JavaScript malicious code detection based on DQN generation of adversarial samples is proposed.The initial discriminator origin_CNN was obtained by training the dataset with CNN. The DQN was used as a generator and the two formed a DQN-origin_CNN adversarial model for training. During the training process, DQN generated the adversarial samples of origin_CNN by code obfuscation actions. The adversarial samples were added to the dataset, and the origin_CNN was continuously trained iteratively to obtain the final discriminator retrain_CNN. The experimental results show that the success rate of generating adversarial samples for the new JP2adversarial model DQN-retrain_CNN composed of retrain_CNN and DQN decreases significantly, from 45.7% to 21.5%, proving that the final generated discriminator retrain_CNN has significantly improved its resistance to attacks.