As the attackers nowadays are getting craftier it is deemed important to have a security system which is easy to maintain and economically affordable and gives suitable defense against attacks both known and novel. In this paper, the concept of genetic programming is applied to recreate open network conditions, using records obtained from KDD Cup'99 dataset. Then the newly created records (network log headers) are assimilated in normal and attack categories using the basic fundamental of clustering i.e. intra-cluster similarity and inter-cluster dissimilarity. Finally results of two prominent partition based clustering approaches i.e. K-Means and K-Medoid are compared and evaluated.