With the rapid development of internet, explosive growth of social network creates large-scale social network data. In order to discover the potential value of the social network data, many analysis methods have been developed. However, using prior knowledge about the subgraph structure of a given network, it is possible to identify a target node or infer some useful information. In this paper, we mainly consider how to prevent such subgraph attack, and propose a practical method to battle it. We use iterative hash to detect the isomorphic subgraph structures and try to greedily match the anonymous subgraphs. Empirical queries on anonymized social network shows both the security and utility advantage of our algorithm.