Extract a square-shaped signal which lies in a specific range
If you just want to estimate the height of the square shaped component you can pass the composite signal thorough a low pass filter with a cut-off frequency close to DC or less than the minimum frequency you can expect to see in the composite signal apart from the square component. The resulting signal would have most of the non-DC components filtered out and hence the energy contained in the filtered signal must be close to the that of the square pulse. After this you can do a Short time Fourier transform of composite signal with a time window less than half the minimum length of the square signal (1/24) and plot the spectrogram. Note the magnitude and variation of DC in the spectrogram. This information when corroborated with low pass filtered result should give you a fair estimate of the height and duration of the square signal.