CubeSats are being increasingly specified for demanding Earth Observation and Astronomical applications where precise pointing, agility and stability are critical requirements. Such precision is difficult in the case of CubeSats, mainly because their small moment of inertia means that even small disturbance torques, such as those due to a residual magnetic moment, have a significant effect. In addition, hardware limitations in terms of power, weight and size, make the task more challenging. The effect of magnetic disturbances has shown itself by the problem of high tumbling rates observed on several CubeSat missions. Post-flight analysis indicates this is often due to un-modelled magnetic moments mainly caused by the current flowing in the spacecraft. Some CubeSats also carry permanent magnets. However, by contrast, the other typical attitude disturbance sources for spacecraft (gravity gradient, aerodynamic, and solar radiation pressure torques) decreases significantly when the satellites become small. Recently, a research programme has been undertaken at Surrey Space Centre at the University of Surrey, to study the source of the residual magnetic field in CubeSats, and to characterise the effect of the resulting disturbance on the attitude of the spacecraft. It has been found that, although the disturbances may be minimised by good engineering practice, in terms of minimising current-loop areas, and minimising the use of permeable materials, these disturbances can still be an issue when a high degree of stability is required. The dynamic nature of the disturbances requires an active mitigation strategy. We therefore propose a new technique using a network of magnetometers to dynamically characterize and then compensate the calculated residual magnetic moment–in flight and in real time. This can be done by implementing a network of eight miniature 3-axis magnetometers on the spacecraft, with an additional one mounted on a deployable boom. These are used to determine the strength and the centre of the magnetic dipole of the spacecraft dynamically. The information will be used by the Attitude Determination and Control System (ADCS) control loops to compensate the measured residual magnetic moment. This technique will contribute to achieving more precise pointing, agility and stability of CubeSats. A hardware prototype using eight HMC1053 3-axis magnetometers monitored and controlled via a Raspberry Pi, was developed and successfully tested with the engineering model of the Alsat-1N CubeSat in a Helmholtz Coil arrangement at the Surrey Space Centre. This demonstrated the real-time dynamic measurement aspect of the technique proposed in this paper. This paper reports on our findings to date.