Collaborative filtering has been widely used in recommender systems as a method to recommend items to users. However, recommender systems utilizing collaborative filtering as their key algorithms are vulnerable to shilling attacks which can generate fake profiles to increase or decrease the popularity of a targeted set of items. In this paper, we present a spectral clustering method to make recommender systems resistant to these attacks in the case that the attack profiles are highly correlated with each other. We formulate the problem as finding a maximum submatrix in the user-user similarity matrix. To search for the maximum submatrix, we translate the matrix into a graph and apply a spectral clustering algorithm to find the min-cut solution to estimate the highly correlated group. The graph is created based on the edge density in order to allow dealing with an unbalanced clustering. The detection is refined through an iterative process to obtain a better estimate of attack profiles. Experimental results show that the proposed approach can improve detection precision compared to existing methods.