\documentclass{article}
\showoutput
\begin{document}
$X^{\ast}$
$ X^*$
\end{document}
shows
....\OML/cmm/m/it/10 X
....\kern0.7847
....\hbox(3.25694+0.0)x4.59723, shifted -3.62892
.....\OMS/cmsy/m/n/7 ^^C
....\mathoff
....\penalty 10000
....\glue(\parfillskip) 0.0 plus 1.0fil
....\glue(\rightskip) 0.0
...\glue(\parskip) 0.0 plus 1.0
...\glue(\baselineskip) 5.11414
...\hbox(6.88586+0.0)x345.0, glue set 316.33334fil
....\hbox(0.0+0.0)x15.0
....\mathon
....\OML/cmm/m/it/10 X
....\kern0.7847
....\hbox(3.25694+0.0)x4.59723, shifted -3.62892
.....\OMS/cmsy/m/n/7 ^^C
which confirms they are in fact the same character (^^C from 7pt cmsy font)
The setting comes from fontmath.ltx which is part of the source of the latex format which has:
\DeclareMathSymbol{\ast}{\mathbin}{symbols}{"03}
\DeclareMathSymbol{*}{\mathbin}{symbols}{"03} % \ast