Coined by an author of Battlestar Galactica (TV series). It was English frack in the original series. Changed to frak in the later series to be a four-letter word. (Compare English fraked (“evil, wicked”) and English frakel (“vile, foul, wretched, worthless”))
English Wiktionary. Available under CC-BY-SA license.