  Gamma ray bursts are among the most energetic events in the known universe. A
highly relativistic fireball is ejected. In most cases the burst itself is
followed by an afterglow, emitted under deceleration as the fireball plunges
through the circum-stellar media. To interpret the observations of the
afterglow emission, two physical aspects need to be understood: 1) The origin
and nature of the magnetic field in the fireball and 2) the particle velocity
distribution function behind the shock. Both are necessary in existing
afterglow models to account for what is believed to be synchrotron radiation.
To answer these questions, we need to understand the microphysics at play in
collisionless shocks. Using 3D particle-in-cell simulations we can gain insight
in the microphysical processes that take place in such shocks. We discuss the
results of such computer experiments. It is shown how a Weibel-like two-stream
plasma instability is able to create a strong transverse intermittent magnetic
field and points to a connected mechanism for in situ particle acceleration in
the shock region.
