Answer
Shalit was a Corporal in the IDF at the time of his capture, which is a junior officer rank. He was taken prisoner in June 2006, during the Israel-Lebanon War. Shalit was held captive by Hamas in Gaza for over five years, until he was released in a prisoner exchange in 2011.