Transonic shocks play a pivotal role in designation of supersonic inlets and ramjets. For the three-dimensional steady non-isentropic compressible Euler system with frictions, we constructe a family of transonic shock solutions in rectilinear ducts with square cross-sections. In this article, we are devoted to proving rigorously that a large class of these transonic shock solutions are stable, under multidimensional small perturbations of the upcoming supersonic flows and back pressures at the exits of ducts in suitable function spaces. This manifests that frictions have a stabilization effect on transonic shocks in ducts, in consideration of previous works which shown that transonic shocks in purely steady Euler flows are not stable in such ducts. Except its implications to applications, because frictions lead to a stronger coupling between the elliptic and hyperbolic parts of the three-dimensional steady subsonic Euler system, we develop the framework established in previous works to study more complex and interesting Venttsel problems of nonlocal elliptic equations.