You can use labourers to explore by building a field at the edge of your vision one at a time, that's probably how they got into your base. This is regarded as cheating if you use it to explore the enemy's base or build in their area. You should be able to check the replay and see what they did (view the game from their perspective and see how they explored the map)
Unfortunately some players will use these dirty tactics

Until we have some way to prevent it like territories (to prevent building in the enemy's village during peace time), then all you can do is ask the players to not do it, and if they don't stop you can quit the game in protest. If enough people do this then those players will never be able to have a proper game because their opponents will always quit when they see them using dirty tactics.
If you can see in a replay that those players are using hacks (for example, placing a field plan in an explored area, which is normally not allowed) then please upload the replay here to report it. We can implement methods to block those kind of hacks. I have never seen any reports of genuine hacking of the KaM Remake though.