The document presents a dynamic botnet detection model based on behavior analysis. The proposed model detects P2P botnets in three phases: (1) identifying P2P nodes using an in-out degree algorithm, (2) clustering suspicious P2P nodes using k-means clustering, and (3) detecting botnets based on the stability of network flows between clustered P2P nodes. Experimental results show the approach can detect botnets with high accuracy by analyzing network traffic at the packet level to measure node connectivity and flow stability over time.