Hindered Brownian diffusion in a square-shaped geometry