I have seen the following result in some notes in algebraic geometry.
Let $S: \{ f = 0 \} \subset \mathbb{P}^3$ be a nonsingular cubic surface, $A = \left( \frac{\partial^2f}{\partial x_i \partial x_j} \right)_{i,j = 0,\dots,3}$, $H = \det(A)$ the Hessian of $f$ and $B = \text{adj}(A)$.
We set $$ R = \sum_{i, j = 0}^{3} B_{i,j} \ \frac{\partial H}{\partial x_i} \frac{\partial H}{\partial x_j} $$
and $$ T = \sum_{i, j = 0}^{3} A_{i,j} \ B_{i,j}. $$
Then 27 lines are the intersection of $S$ with $F : \{ R - 4 HT = 0 \}$.
What is the name of this result? Where can one find the proof?
Is it true for singular cubic surfaces (if we count lines with multiplicity)?
This is a result of Salmon and Clebsch. You can find it in the fourth edition of Salmon's A treatise on the analytic geometry of three dimensions (1882). (See https://archive.org/details/treatiseanalytic00salmrich). It is on p. 510 and more details starting from p. 558. Clebsch' proof uses the symbolic method. I am not aware of a modern proof.
It is true for singular surfaces containing a finite number of lines. The statement in general is that the ideal generated by the cubic form defining the surface and this form of degree nine describes all points lying on all lines of the surface. If the surface is a cone (eg if it consists of three planes) the Hessian vanishes identically and so does $R-4HT$. Therefore the zero locus of the said ideal is the whole surface, as it should be.