Unstable Plasma Modes Amplified by Cosmic Rays in the Upstream of Collisionless Shock