An Etymological Dictionary of the German Language/Schabernack
Schabernack, m., ‘hoax, practical joke,’ from MidHG. schabernac, schavernac, m., ‘hoax, mockery, scorn,’ also chiefly ‘shaggy (lit. neck-rubbing?) fur cap,’ and ‘a kind of strong wine.’ Allied to OHG. ir-scabarôn, ‘to scratch out, scrape together.’ It is uncertain whether the second part of the compound is connected with ModHG. Nacken or with the verb necken. The MidHG. word with its numerous senses may have also meant orig. ‘prankish hobgoblin.’ Comp. den Schelm im Nacken haben, ‘to be a sly dog’?.