Five illegal migrants have been detained after being caught trying to sneak into the UK.