Literally 'do what?' — a very casual way to ask what someone is doing or why. The 吗 here is the colloquial rising-tone má (a variant orthography for 嘛), not the toneless question particle.
干吗 is very colloquial and casual. It can sound confrontational depending on tone — 你干吗呢 (curious) vs. 你干吗!(annoyed).
mistakes
Also written 干嘛 — both 干吗 and 干嘛 are acceptable spellings for the same gànmá. Watch the tones: 干 is 4th tone (gàn, to do), not 1st (gān, dry); 吗 here is rising má, not the toneless question particle ma.