UK telecoms firm TalkTalk has confirmed falling victim to a data breach after a threat actor boasted about hacking it.