First you are working illegally by doing that and therefore if detected you will be deported and forbidden from returning to Canada for a couple of years. Additionally, you will have this above your head even after you stop working as the crime doesn't stop when you stop working, you are still found in breach of the act and therefore deported.
They don't disclose how they investigate but both CRA and immigration board do with different methods. They can be informed about the practice of your employer or you, if you get a ticket the police can contact immigration canada and an investigation can be started....
Additionally you don't pay your taxes and therefore you are liable and committing a crime.
Penalty for tax evasion (what you are talking about) is a fine of up to $25k and up to one year in jail.
CRA has a department looking for people who try to evade taxes.