We study the asymptotic behavior of linear hyperbolic systems subject to unknown boundary disturbances. Our aim is to construct a boundary feedback law, based on a sliding mode procedure, which rejects the disturbance in finite time and which globally stabilizes the equilibrium point zero. The main novelty of our approach consists in defining a sliding variable and a corresponding sliding surface on which the global asymptotic stability result is ensured. More precisely, the sliding surface is derived from the gradient of a Lyapunov function. We will extend this approach to an equation of non-linear conservation laws with simulations.