Twitter's DNS records were compromised overnight with users redirected to a page containing a green flag and Arabic writing and the message 'This site has been hacked by the Iranian cyber army'.