Estimation of Input Signal to Obtain the Desired Output Signal for an Unknown Filter
In the most simple case, just to give intuition about the problem, it is really easy.

In the Frequency Domain:

$$ {Y}^{\ast} \left( \omega \right) = H \left( \omega \right) {X}^{\ast} \left( \omega \right) \Rightarrow {X}^{\ast} \left( \omega \right) = \frac{ {Y}^{\ast} \left( \omega \right) }{ H \left( \omega \right) } $$

Since $ {Y}^{\ast} \left( \omega \right) $ is known all needed is $ H \left( \omega \right) $.

Yet since we have access to a black box of $ H \left( \omega \right) $ we can set input of a known signal $ X \left( \omega \right) $ and have the output $ Y \left( \omega \right) $ which will give us $ H \left( \omega \right) $:

$$ Y \left( \omega \right) = H \left( \omega \right) X \left( \omega \right) \Rightarrow H \left( \omega \right) = \frac{ Y \left( \omega \right) }{ X \left( \omega \right) } $$

As others pointed out it is called Deconvolution and as you mentioned it can be done using Least Mean Square (LMS) Filter.