Working off the books is when an employer doesn’t register you with the government. Your employer risks a hefty fine for this. An employee will not be entitled to pension or health insurance, for example. If you have no legal residence, and there is an inspection in the workplace, you run the risk of ending up in a detention centre and being removed from Belgian territory.
If you have legal residence and you have received benefits (unemployment benefit, a living wage, etc.) you may be obliged to repay them. If you don’t receive benefits, you may be fined between €80 and €800. There are exceptions to this: you can read more about this here.