Section 23 of the Indian Contract Act voids agreements whose object or consideration is forbidden by law, fraudulent, or would defeat legal provisions. Courts also deem agreements immoral or against public policy as void. Option D correctly captures all these grounds.