The legal system in Sudan is based wholly on sharia law, derived mainly from the Quran.
Possession and use of drugs is strictly illegal and penalties are severe – don’t think about bringing anything over the borders or buying it while you’re here. Alcohol is also prohibited.
Sudan's security services are sensitive and active. There is no reason why travellers should attract the attention of the police, but if it happens, it's usually pretty harmless information-gathering. Police, military and immigration officials are generally courteous and calm. In your dealings with officialdom, you should always make every effort to be patient and polite in return.
If you find yourself in a sticky legal predicament, contact your embassy.