Fixed Phanx's code. The first argument of a hooksecurefunc function is itself, and there was a missing comma between GameTooltip and "SetUnitAura". Fixed, and working great.
Code:
hooksecurefunc(GameTooltip, "SetUnitAura", function(self, unit, index, filter)
local _, _, _, _, _, _, _, caster = UnitAura(unit, index, filter)
local name = caster and UnitName(caster)
if name then
GameTooltip:AddDoubleLine("Cast by:", name, nil, nil, nil, 1, 1, 1)
GameTooltip:Show()
end
end)