If you wish to visit Afganistan, you must have a valid passport and an Afgan visa, so you can avoid getting in trouble.
In case you get caught without a visa, you can be deported or pay a heavy fine.