How we hacked Blackboard and changed our grades (2018)
Blackboard served user-uploaded files on the same origin as the application, and its cross-site scripting filter could be bypassed by uploading a file with a leading null byte via WebDAV or by uploading an XML/SVG file that referenced the HTML namespace. An attacker could then execute JavaScript in the context of a victim's session, and because the session identifier was also exposed in the WYSIWYG editor, steal it and take over the victim's account.
bustbyte.no
Published on bustbyte.no
Blackboard is a web application that teachers and students use to deliver and evaluate assignments, manage courses and exchange files.
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
Impact
An attacker could hijack a teacher's account and perform any action the teacher is authorized to do, such as changing grades, downloading files not intended for students, and emailing other users.
What the attacker needed
Attacker has a student account; victim (professor) clicks a link and views the file; victim is logged in to Blackboard
The fix
The vulnerabilities were fixed after being reported, as confirmed by the NTNU Security Operations Center.
How it was found
- A student uploads a file containing malicious code to Blackboard, using either a null byte via WebDAV or an XML/SVG file to bypass the cross-site scripting filter.
- The student submits the assignment to the professor, who clicks the link and views the uploaded file.
- The malicious code runs in the professor's browser and sends an XMLHttpRequest to scrape the session identifier from the WYSIWYG editor.
- The attacker forwards the session identifier to himself and gains access to the professor's account.
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.
When you upload a file to a website, it should be treated as untrusted content and served from a separate domain so it cannot run code in the context of the main site. Here, Blackboard served uploaded files from the same domain as the application, and its filter meant to block malicious code could be tricked. This let an attacker run their own code when a victim viewed the uploaded file, and then steal the victim's session to act as them.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.