DEF: an advantage that comes from a difficult or unpleasant situation.
EX:
Silver lining: Northeast drought benefits some businesses.
Every cloud has a silver lining
Merriam-Webster Online Dictionary
silver lining (noun) a consoling or hopeful prospect