We describe an algorithm for simulating ultrasound propagation in random one-dimensional media, mimicking different microstructures by choosing physical properties such as domain sizes and mass densities from probability distributions. By combining a detrended fluctuation analysis (DFA) of the simulated ultrasound signals with tools from the pattern-recognition literature, we build a Gaussian classifier which is able to associate each ultrasound signal with its corresponding microstructure with a very high success rate. Furthermore, we also show that DFA data can be used to train a multilayer perceptron which estimates numerical values of physical properties associated with distinct microstructures.