<<Graphics`Polyhedra`
Menger[0,{i_,j_,k_}]:={Cuboid[{i,j,k}]};
Menger[n_,{i_,j_,k_}]:=Module[{s={}},Do[If[Not[u==v==2 || v==w==2 || u==w==2],
 s=Union[s,Menger[n-1,3^(n-1)*{u,v,w}+{i,j,k}]]],{u,3},{v,3},{w,3}];s];
Show[Graphics3D[Menger[3,{0,0,0}]],Boxed->False];

