– Many P2P-based storage systems use distributed indexing service for searching documents. There are two security issues when the nodes providing the index service are compromised by adversaries. First, the adversaries may delete the indexes or stop the program of indexing service, making the affected documents disappear in the search infrastructure. Second, the adversaries may leak the locations of the storage nodes hosting certain documents, making those nodes the target of DOS attacks. We propose a protocol called SCUBE which addresses these attacks by using secret-sharing based threshold cryptography and the concept of virtual addresses. Our results show that SCUBE performs appreciably well under different attack scenarios and incurs nominal overhead. A working prototype of SCUBE has also been implemented and tested on the Planetlab testbed.