Construct a principal bundle with base M and structure group G. Define Projection map and trivialization of the bundle in usual way. Denote this bundle as $P_1$. Construct another trivial principle fiber bundle $P_2= P_1\times G$ with base $P_1$ and Structure group G with trivialization of $P_2$ consisting of $P_1$ and an identity map from $P_2$ to $P_1\times G$. Construct $P_3$ as $P_2\times G$ as in the second step with local trivialization consisting of $P_2$ and an identity map from $P_3$ to $P_2\times G$.
BRS transformations are identified with infinitesimal gauge transformation on $P_3$ with parameters related to ghost fields, where these ghost fields are identified with part of certain one-forms on base space $P_2$. For details consult ref. 1 and 2.
There is another approach of group manifold in which you can gauge the algebra of $G+Q$ to obtain BRS transformation of Gauge fields where $G+Q$ has the structure of a group manifold. In short, BRST transformation are a sort of diffeomorphic invariance of this group manifold. Consult ref. 3 for details.
1- Geometric structure of Faddeev- Popov fields and invariance properties of
gauge theories: Quiros, Urries, Hoyos, Mazon and Rodriguez.
2- Geometrical gauge theory of ghost and Goldstone fields and of ghost symmetries: Ne'eman and Thierry-Miec.
3- Supergravity and superstrings (a geometric perspetive): Castellani, Auria, Fre (3 vol. set with first vol. containing the necessary Group manifold machinery).