(*Defines the Function*)UpperTriangulateModp[Mat_,p_]:=Mod[HermiteDecomposition[Mat][[2]],p]
(* Input the Matrix *)M={{1,1,0,0,-2},{0,-2,0,1,1},{0,1,1,-2,0},{1,0,-2,0,1},{-2,0,1,1,0}};
(*Double Check what you entered*)
M//MatrixForm
(*Put Matrix into Upper Triangular form mod p *)
UpperTriangulateModp[M,17]//MatrixForm
(* Hit Shift+Enter to evaluate*)

(*How to Compute a Determinant in Mathematica*)Det[{{t,-1,0,0},{0,1-t,0,t},{0,t,-1,1-t},{1-t,0,t,-1}}]