A system is in a heat bath of temperature T so we work with the canonical ensemble. We consider $N$ degrees of freedom $x_1, x_2, ..., x_N$ and $x$ is the vector $(x_1~ x_2 ~ ... ~ x_N)^T$. The potential energy is quadratic so it can be expressed as a function of its second derivatives:
$
U=\sum_{i,j} x_i ~H_{i,j} ~x_j = x^T H x ~~
$
with $H_{i,j}=\frac{\partial^2 U}{\partial x_i \partial x_j}$.
$H$ is assumed invertible.
The partition function $Z$ in the canonical ensemble is:
$
Z= \int (d^Nx) ~ e^{ -\frac{1}{2} \beta x^T H x} ~ = ~ \sqrt{\frac{(2 \pi)^N}{\det(H)}}~~
$
with $~~\beta=\frac{1}{k_BT}$,
where we used the multivariate Gaussian formula.
$
<x_i x_j> = \frac{1}{Z} \int (d^Nx) ~ x_i x_j e^{ -\frac{1}{2} \beta x^T H x}
$
$
= \frac{1}{Z} (-\frac{2}{\beta})\frac{\partial}{\partial H_{i,j}}\int (d^Nx) ~ e^{ -\frac{1}{2} \beta x^T H x}
$
$
= -2k_BT \frac{1}{Z} \frac{\partial Z}{\partial H_{i,j}}
$
$
= -2k_BT \frac{\partial \ln(Z)}{\partial H_{i,j}}
$
We plug-in the expression of $Z$ that we found above:
$
<x_i x_j>= k_BT \frac{\partial }{\partial H_{i,j}}(\ln(\det(H))
$
$H$ is invertible so we use Jacobi's formula:
$
\frac{\partial }{\partial H_{i,j}}(\ln(\det(H)) = Tr(H^{-1} \frac{\partial H}{\partial H_{i,j}})
$
$\frac{\partial H}{\partial H_{i,j}}$ is a matrix for which the element $\{i,j\}$ is $1$ and all other elements are $0$. In other words:
$
E\equiv \frac{\partial H}{\partial H_{i,j}}
$ with
$
E_{k,l}=\delta_{k,i} \delta_{l,j}.
$
$
Tr(H^{-1} \frac{\partial H}{\partial H_{i,j}}) = Tr(H^{-1}E)
$
$
(H^{-1}E)_{k,l}=\sum_m H^{-1}_{k,m}E_{m,l}=\sum_m H^{-1}_{k,m}\delta_{m,i}\delta_{j,l} = H^{-1}_{k,i} \delta_{j,l}
$
$
Tr(H^{-1} E)=\sum_n (H^{-1}E)_{n,n}=\sum_n H^{-1}_{n,i} \delta_{j,n} = H^{-1}_{j,i} = H^{-1}_{i,j}
$
and
$
<x_i x_j> = k_B T H^{-1}_{i,j}
$