Entering or leaving Brazil by land without going through customs

I've recently been around a few land borders in Brazil and have been surprised at how lax they are. 

It got me wondering. It's incredibly easy to walk across a land border and back without stopping at customs.  In some crossings, Brazilians are legally allowed to do this, for example when travelling to Cidade Del Este in Paraguay.

If a foreigner does this and gets caught (it would be stupid to do if you have a visa anyway) what is the punishment?  A fine?  Any chance they could invalidate your visa or something like that?

It's not something I will do, but it's just a curiosity of how it works. On one of these crossings leaving Brazil, the customs officer didn't ask for the entry paper and was just going to let me pass through to leave without an exit stamp on my passport.  I looked at him and gave him the paper and then he stamped my passport.  I imagine I could take some heat when trying to te-enter.  I imagine in some cases they wouldn't be able to know if someone had originally over stayed their visa without an exit stamp.

You could possibly be deported but probably not.