The present application provides a
network testing method and apparatus, an electronic device, a storage medium, and a program product. The method comprises: obtaining target network node information of a target network node, and determining a
virtual network topology on the basis of the target network node information; by using a
vulnerability knowledge graph, determining target patch information and target
vulnerability information corresponding to the target network node; on the basis of preset network node rewards and
attack operation success rates, performing a
virtual network penetration test on the
virtual network topology where the target network node is located, so as to obtain a
penetration test result; on the basis of the
penetration test result, determining an exploited network node, and on the basis of the
vulnerability knowledge graph, determining remediation patch information, so as to remediate the exploited network node by using the remediation patch information; performing a virtual network penetration test on the exploited network node and the target network node, so as to obtain a post-remediation penetration test result; and on the basis of a comprehensive
score corresponding to the post-remediation penetration test result and a comprehensive
score corresponding to the penetration test result, respectively obtaining a vulnerability report and a defense report for the target network node.