Crimes occur with many participants. Murders, car-jacking, embezzlement, fraud, white collar crime, insurance fraud, and almost any crime you can imagine can happen with more than one defendant. Anytime there is a case involving multiple defendants there is the possibility that one of the defendants will turn "state's evidence". In other words, one defendant works out a deal with the District Attorney or United States Attorney for a lesser sentence, lesser charges, or even a complete dismissal in return for testifying against the remaining defendants.
What should the defense attorney do who is faced with the co-defendant who is now cooperating with the prosecutor? Of course, the first thing the prosecutor will do is require the cooperating defendant to "tell the truth, the whole truth and nothing but the truth, no matter who is asking the questions". The "truth" is an elusive term. Ideally, it means that the testifying co-defendant will, in fact, reveal all to the jury and to anyone who asks the questions.
In reality, for the prosecutor the "truth" means testify to the same statement that the cooperating defendant gave when arrested. When looking to give a deal to one or more defendants, one of the most desirable qualities is that the statement given when arrested is the one the prosecutor wants to use as the "truth" of the case. Then when the testimony is given it is consistent with the earlier statement and makes it easy for the prosecutor to argue to the jury that testimony is the same as the earlier statement and thus is "truthful" since when the first statement was made there wasn't anything promised in return.
To attack this "truthful" testimony the defense attorney for the remaining defendant(s) should go after the benefit given to the defendant. Usually, there will be negotiations between the cooperator, his attorney, and the prosecutor. A demand for all the benefits of the "deal" must be made on the prosecutor. Full disclosure of all that is the reward for cooperation must be made by the prosecutor.
In cross examination, it makes no sense to go over all the points made during direct examination. For example, don't question every statement made, by doing this the defense lawyer only re-emphasizes every bad thing the remaining co-defendant said about the defendant. Instead, the defense lawyer should attack the deal, the benefits being given, the fact that the fate of the testifying co-defendant is solely in the hands of his benefactor, the prosecutor.
Many times the most effective means of attacking the credibility of the witness is to go after any inconsistencies in the testimony from the original statement or the many versions of the statement that have been given. Most defendants will give several versions of the "truth" before settling on one which is most appealing to the prosecutor. An effective defense attorney must bring out every different version of the statement, disprove any statement by using other witnesses to prove what is claimed isn't true, and finally use the prior criminal history of the witness against him. The rule for the questioning attorney should be not to re-hash the prosecutor's case in cross examination, but instead provide a reason the jury shouldn't trust the benefit seeking co-defendant.
In a recent murder case involving co-defendants, I had the distinct honor or having the judge specifically praise the job I did when cross examining the co-defendant. This judge sees a lot of attorneys and a lot of direct and cross examination and praise from him really meant a lot.