1530s, "scullion, kitchen knave," of uncertain origin. Perhaps it is a reference to military units or attendants so called for the color of their dress or their character. It might have been originally a mock-military reference to scullions and kitchen-knaves of noble households, black-liveried personal guards, and shoeblacks. See black (adj.) + guard (n.). By 1736 the sense had emerged of "one of the idle criminal class; man of coarse and offensive manners." Hence the adjectival use (1784), "of low or worthless character."
"dune," Old English sondhyllas (plural); see sand (n.) + hill (n.). For sand-hiller "poor white of Georgia or South Carolina" (by 1848) see cracker (n.2). Earlier it meant "blackguard, user of foul language" (by 1813) in the dialect of Durham and Yorkshire, according to contemporary sources probably from Sandhill in Newcastle.