$\DeclareMathOperator\ad{ad}\DeclareMathOperator\Tr{Tr}$I have been thinking about this for some time but have had no luck. I have found some sources that say higher Casimir elements can be obtained by generalizing the second order Casimir, which is $\sum_{\alpha,\beta} \kappa ^{\alpha \beta} X_{\alpha} X_{\beta}$, where $\kappa ^{\alpha \beta}$ is the inverse of the Killing form, and writing $C_3 = \sum g^{\alpha_1 \alpha_2 \alpha_3} X_{\alpha_1} X_{\alpha_2} X_{\alpha_3}$, where $g^{\alpha_1 \alpha_2 \alpha_3} = \Tr(\ad X^{\alpha_1} \ad X^{\alpha_2} \ad X^{\alpha_3})$ and $X^{\alpha} = \kappa^{\alpha \beta}X_{\beta}$. This definition does not give an element in the center of the universal enveloping algebra.
Is there any text out there where an explicit description of higher Casimir operators is given?