干嘛 and
干什么 are near-equivalents, but
干嘛 is chattier and shows more emotion. Mainland writers often use the variant
干吗; both spellings share the same rising-tone má reading. Note the
嘛 here is rising tone, not the toneless particle
嘛 of sentences like
他是学生嘛.