ž[x_,y_]:=Mod[x.y,2]

Ms=(({{1, #[[1]], #[[2]]}, {0, 1, #[[3]]}, {0, 0, 1}}))&/@Tuples[{0,1},3]

Table[MatrixForm[Ms[[i]]~ž~ Ms[[j]]],{i,1,8},{j,1,8}]//TableForm

Table[FirstPosition[Ms,Ms[[i]]~ž~ Ms[[j]]][[1]],{i,1,8},{j,1,8}]//TableForm

MatrixOrder[m_]:=Module[{tm=m,i=1},While[tm≠IdentityMatrix[Length[m]],tm=tm~ž~m;i++;];i]

MatrixOrder[Ms[[3]]]

{MatrixForm[#],MatrixOrder[#]}&/@Ms//TableForm