  The $K$-core of a graph is the unique maximum subgraph within which each
vertex connects to $K$ or more other vertices. The optimal $K$-core attack
problem asks to delete the minimum number of vertices from the $K$-core to
induce its complete collapse. A hierarchical cycle-tree packing model is
introduced here for this challenging combinatorial optimization problem. We
convert the temporally long-range correlated $K$-core pruning dynamics into
locally tree-like static patterns and analyze this model through the
replica-symmetric cavity method of statistical physics. A set of coarse-grained
belief propagation equations are derived to predict single vertex marginal
probabilities efficiently. The associated hierarchical cycle-tree guided attack
({\tt hCTGA}) algorithm is able to construct nearly optimal attack solutions
for regular random graphs and Erd\"os-R\'enyi random graphs. Our cycle-tree
packing model may also be helpful for constructing optimal initial conditions
for other irreversible dynamical processes on sparse random graphs.
