The man in his thirties was attacked by a 4.5m shark off Michaelmas Island, southeast of Perth, according to the Western Australian government.