Getting easy-to-understand documentation on how to make a "secure" macro in Lua is not easy, so here we go:
Same macro as the one you provided, written in Lua
Lua Code:
local button = CreateFrame("Button", "MyButton", UIParent, "SecureActionButtonTemplate")
button:Hide()
button:SetAttribute("type", "macro")
button:SetAttribute("macrotext", "/target [@Kor'kron Warshaman,nodead] Kor'kron Warshaman; SetRaidTarget('target', 8)")
Now you can make a new macro (ingame) that does this: