Leveraging LLMs to Speed-Up Vulnerability Discovery: How I Found
Three stored cross-site scripting flaws existed in the Scada-LTS platform, in the Data Point Name, Data Source Edit and Reports colour fields, because user input was rendered through unsafe innerHTML and unescaped JSP expressions. An attacker could store script in these fields so it ran in another user's browser.
I was initially preparing training material on vulnerability discovery. Instead of limiting myself to slides and traditional tools, I decided to conduct a real experiment using some of my favorite Large Language Models (LLMs).
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the application wrote user-supplied field values into pages through unsafe innerHTML and unescaped JSP expressions, so markup was treated as code.
Impact
An attacker could store script that runs in another user's browser session, though the text only demonstrates a popup alert and does not show theft of data or sessions.
What the attacker needed
Access to the Scada-LTS web interface; ability to edit data points, sources or reports; victim views the affected page
How it was found
- Fork the Scada-LTS project and run Semgrep over the codebase to find hotspots.
- Use the flagged lines as entry points for deeper code review with the LLM tools.
- Import a pre-built sample project to populate the application with realistic data.
- Test fields systematically, starting with the data point edit endpoint.
- Confirm the stored script executes by observing the alert popup.
- Repeat the test on the Data Source Edit and Reports colour fields.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
Stored cross-site scripting means a site saves text a user types and later shows it to other users without cleaning it. If that text contains code a browser runs, the code executes in the victim's session. Here several input fields kept such code and displayed it later.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.