How I hacked a website integrated w/ Facebook having 1.1 mil. users under 45 seconds.
The quiz site sent every question's correct answer to the browser inside the page's answer-handling function, so the answers were visible to anyone who viewed the source. An attacker could read them and score perfectly on any quiz, and could also answer offline with the network cut and submit later.
Published on medium.com
{{media:0}}
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.
Context
WeeQuizz (en.weequizz.com) is a Facebook-integrated quiz application in which users create personal quizzes and their Facebook circle answers them. The author notes the application had over 1.1 million likes, a figure he used to justify spending time on it. The feature under examination is the quiz-taking page: when a quiz is loaded, the server sends the questions and their options to the browser, and the page uses a custom JavaScript function, cAnswer(...), to handle answer selection.
The write-up was published on 30 January 2019 and describes work done in May 2017. The author states that the bugs were still active at the time of publication and that he had received no response from WeeQuizz after reporting them.
Setup
No accounts, roles or special tooling were required beyond a browser. The author used the Chrome inspection tools (Ctrl+Shift+I) and the page source view (view-source:) to read the quiz page. The only precondition was a loaded quiz: once a Quiz ID (for example etswuypxf) is opened, the server delivers all questions and options to the client at once.
Finding it
After roughly an hour of playing with the site, the author inspected the page source. Two things stood out: the questions are loaded ahead of time and are not dynamic, and each option carries an onclick="cAnswer(...)" handler. The structure of the question and option IDs looked wrong to him.
Initial inspection of the page.
Looking at the source with the first question highlighted:

view-source: en.weequizz.com, with Question 1 highlighted.
From this he drew two conclusions:
- Once the Quiz ID loads, the server sends all questions and their respective options to the client side at once.
- The
onclick="cAnswer(...)"parameter is interesting.
Exploitation
Step 1: read the cAnswer structure
A question with its options renders handlers of this shape:
Question with options.
The custom function cAnswer is called with eight sub-parameters:
cAnswer(1, 10, 'b2b8x', 'p6lg8', 'exy5s', 'etsyuypdf', 'n08t3', true)
The first sub-parameter, 1 here, is the Question ID in the class named m_question_q_list, and the author confirmed this. The first, second and last sub-parameters (1, 10 and true) he describes as useless constraints. The interesting part is the string variables in between.
Step 2: compare the handlers of one question
Listing the handlers for the four options of the same question shows that most of the strings repeat and only one position changes:
cAnswer(1, 10, 'b2b8x', 'p6lg8', 'exy5s', 'etsyuypdf', 'n08t3', true)cAnswer(1, 10, 'b2b8x', 'p6lg8', 'z3jpz', 'etsyuypdf', 'n08t3', true)cAnswer(1, 10, 'b2b8x', 'p6lg8', 'n08t3', 'etsyuypdf', 'n08t3', true)cAnswer(1, 10, 'b2b8x', 'p6lg8', 'rxmj5', 'etsyuypdf', 'n08t3', true)
Reducing each call to the positions that differ between options makes the pattern plain:
cAnswer(bulls**t, bulls**t, 'same', 'same', 'exy5s', 'same', 'same', bullsh**t)
cAnswer(bulls**t, bulls**t, 'same', 'same', 'z3jpz', 'same', 'same', bullsh**t)
cAnswer(bulls**t, bulls**t, 'same', 'same', 'n08t3', 'same', 'same', bullsh**t)
cAnswer(bulls**t, bulls**t, 'same', 'same', 'rxmj5', 'same', 'same', bullsh**t)
The fifth sub-parameter is unique per option, so it identifies the option. The seventh sub-parameter is n08t3 in every call, so it is shared by all options of the question.
Step 3: identify the answer marker
Comparing the calls again, this time marking the seventh position, shows that the shared value is the one that matters:
cAnswer(bulls**t, bulls**t, 'same', 'same', 'exy5s', 'same', 'n08t3', bullsh**t)
cAnswer(bulls**t, bulls**t, 'same', 'same', 'z3jpz', 'same', 'n08t3', bullsh**t)cAnswer(bulls**t, bulls**t, 'same', 'same', 'n08t3', 'same', 'n08t3', bullsh**t)←cAnswer(bulls**t, bulls**t, 'same', 'same', 'rxmj5', 'same', 'n08t3', bullsh**t)

Jackpot.
In the third call the fifth and seventh values are identical (n08t3). The author presents this comparison as the jackpot moment, the point at which the pattern became clear. Because every option's handler carries the answer value, the correct answer for every question is present in the page source before the user answers anything.
Step 4: exploit manually
With the answer value known for each question, the quiz can be completed correctly without knowing the subject matter. The author demonstrates this on a quiz belonging to someone else.

Voila.
You just nailed the quiz of an unknown person, Enjoy!

He names this the Tangled List Bug and suggests the same method can be used to pass a crush's quiz.
Step 5: automate it
Rather than reading handlers by hand, the author automated the process. He does not publish the full script: the code is shown blurred, and he says it is merely 22 lines. His only hint is to take care of time delays and of the loading of DOM objects when clicking the target object.





Code of the exploit, blurred.
He notes that he learned JavaScript through Chrome extensions, including building, packaging and debugging one, and through work on Connect-Me, a FOSSASIA project.
Step 6: the second bug, without reading the source
The second issue, which he calls the W.T.F. Bug and describes as being for the lazy ones, came from looking at the application's workflow and HTTP responses. It needs no code inspection and takes three steps:
- Generate a Quiz ID and load the quiz in the browser.
- Kill the transmission (he suggests cutting the LAN cable or breaking the WiFi router) and then start clicking options at random. Write down or remember the answers.
- Reconnect the transmission and do the quiz again. This time you have all the answers, and the WeeQuizz server acknowledges the transaction and completes the process.


In other words, the author's steps have you answer offline, note the answers, then reconnect and submit the quiz with the server acknowledging the transaction.
Root cause
The core mistake is that the correct answer is shipped to the client inside the page. The server sends all questions and options at once, and each option's cAnswer(...) call includes the answer value as its seventh sub-parameter, so the answer is recoverable from the HTML for every question of any quiz whose ID is known. The author's summary is that the target handles sensitive data (the quiz answers) on the client side, which he says is not good for health.
The second bug needs no source reading: the author's steps have you answer offline, note the answers, then reconnect and submit the quiz. The report does not describe any server-side check that would have prevented either behaviour.
Impact
An attacker who can open a quiz can obtain every correct answer from the page source and score perfectly on any quiz, including one belonging to an unknown person. The author frames the impact as destroying the very purpose of making quizzes rather than as catastrophic to the service, and he explicitly warns that a perfect score on a personal online quiz should not be trusted. No user accounts, private data beyond the quiz answers, or server-side access are described as being obtained.
Fix
The report does not say that any fix was made. The author states the bugs were still active when he published, after reporting them by email and receiving no response, including after a reminder four weeks later. A fix would be to stop sending the answer to the client: keep the correct answer on the server and have the server evaluate submitted answers.
Variants to test
- Inspect the
onclickhandlers of quiz or survey options and compare the arguments across options of the same question. A positive result is one argument position that is constant across all options of a question while another position is unique per option: the constant value is a candidate answer marker. - Load a quiz and search the page source for the answer value or for a per-question constant. A positive result is the answer being present in the delivered HTML before any submission.
- Disconnect the network, answer questions and observe whether the page still marks answers correct or wrong. A positive result is local evaluation of correctness while offline, followed by server acceptance of the result after reconnection.
- Check whether the quiz result is submitted as a client-computed score rather than as the individual answers. A positive result is a request whose body contains a score or completion flag that the client controls.
What happened, in plain words
A quiz website called WeeQuizz (at en.weequizz.com) let people create their own quizzes and share them with friends on Facebook. The author noticed it had more than 1.1 million likes, which told him a lot of people were using it, and that made it worth a look. He spent about an hour poking at the quiz page in his browser and found that the correct answers to every question were sitting right there in the page itself, hidden only in the sense that most people never look. He could read them out and score perfectly on a quiz, including one made by a person he did not know. He also found a second, simpler trick that needed no code reading at all: switch off the internet, answer the quiz, note which answers the page marked as right, then switch the internet back on and answer again with the answers you now know.
He reported both issues to WeeQuizz by email. He waited a week with no response, then sent a reminder after four weeks, and heard nothing back. He published the write-up on 30 January 2019, describing work he had done in May 2017, and said the bugs were still active at the time of publication.
Two ideas run through the whole story, so it is worth meeting them now.
- Client side and server side. A website is really two programs talking to each other. The server is a computer somewhere else that holds the data and does the important work. The client is your own browser, the program on your machine that shows the page. Anything the server sends to your browser can be read by you, because it has to arrive on your computer to be displayed. If a secret is sent to the client, it is no longer a secret.
- Sensitive data. Some information matters: a password, a bank balance, the answer key to a quiz. Sending it to the client when the client does not need it is the mistake at the heart of this report.
The setup
Nothing special was needed to follow along. No account, no special software, no hacking tools. The author used two things every browser has:
- The page source view. Typing
view-source:before a web address, or right-clicking and choosing to view the page source, shows the raw text the server sent. This is the recipe, not the finished cake: it is the instructions the browser used to build what you see. - The browser's inspection tools. Pressing
Ctrl+Shift+Iin Chrome opens a panel that shows the same underlying text, organised into a tree, and lets you point at any element on the page to see the code behind it. It is the same information as the page source, just easier to navigate.
The only precondition was that a quiz was open. Once you open a quiz, identified by a Quiz ID such as etswuypxf, the server sends the whole quiz to your browser in one go. A Quiz ID is simply a short random-looking label that names one particular quiz, the way a house number names one particular house on a street.
Finding it
After roughly an hour of playing with the site, the author opened the inspection tools and looked at the code behind the quiz page.
Initial inspection of the page.
Two things caught his eye. First, the questions were all loaded ahead of time rather than fetched one at a time as you answer. Second, every answer option had an onclick="cAnswer(...)" attribute attached to it. An onclick attribute is a small instruction that says "when this thing is clicked, run this piece of code". Seeing one on every option meant the page already knew, for each option, what to do when it was chosen, and that instruction was written into the page before the user did anything.
He then viewed the raw source with the first question highlighted:

view-source: en.weequizz.com, with Question 1 highlighted.
From this he drew two conclusions:
- Once the Quiz ID loads, the server sends all the questions and their options to the client side at once.
- The
onclick="cAnswer(...)"parameter is interesting.
That second point is the thread he pulled. If the page contains a separate instruction for every option, and those instructions differ, then comparing them might reveal what the page knows about each option.
Exploitation
Step 1: read the cAnswer structure
A question with its options renders handlers of this shape:
Question with options.
The custom function cAnswer is called with eight sub-parameters:
cAnswer(1, 10, 'b2b8x', 'p6lg8', 'exy5s', 'etsyuypdf', 'n08t3', true)
A function is a named block of code that does something when called. The name here is cAnswer, short for "click answer". The values inside the brackets are the arguments, the ingredients handed to the function so it knows which answer was clicked. There are eight of them, separated by commas.
Reading them left to right:
1is the Question ID, the number of the question within the quiz. The author confirmed this by checking the class namedm_question_q_list, which is a label in the page's structure that groups the questions together.10is a number the author describes as a useless constraint, meaning it plays no part in revealing anything.'b2b8x','p6lg8','exy5s','etsyuypdf','n08t3'are short strings of letters and digits. A string is just text. These look like randomly generated identifiers, the kind of label a computer makes up to tell one thing apart from another.trueis a true/false value, the last sub-parameter, also described as a useless constraint.
The interesting part is the strings in the middle. The author's question was: which of these change from option to option, and which stay the same?
Step 2: compare the handlers of one question
To answer that, he listed the handlers for the four options of the same question:
cAnswer(1, 10, 'b2b8x', 'p6lg8', 'exy5s', 'etsyuypdf', 'n08t3', true)cAnswer(1, 10, 'b2b8x', 'p6lg8', 'z3jpz', 'etsyuypdf', 'n08t3', true)cAnswer(1, 10, 'b2b8x', 'p6lg8', 'n08t3', 'etsyuypdf', 'n08t3', true)cAnswer(1, 10, 'b2b8x', 'p6lg8', 'rxmj5', 'etsyuypdf', 'n08t3', true)
This is four calls run together on one line. Read it as four separate lines, one per option. Comparing them position by position:
- The first value is
1in all four, because all four options belong to question 1. - The second value is
10in all four. - The third value is
'b2b8x'in all four. - The fourth value is
'p6lg8'in all four. - The fifth value changes:
'exy5s','z3jpz','n08t3','rxmj5'. One different value per option. - The sixth value is
'etsyuypdf'in all four. - The seventh value is
'n08t3'in all four. - The eighth value is
truein all four.
So most of the strings repeat, and only one position changes. To make the pattern easier to see, he replaced the repeated values with the word same and the uninteresting ones with a rude placeholder:
cAnswer(bulls**t, bulls**t, 'same', 'same', 'exy5s', 'same', 'same', bullsh**t)
cAnswer(bulls**t, bulls**t, 'same', 'same', 'z3jpz', 'same', 'same', bullsh**t)
cAnswer(bulls**t, bulls**t, 'same', 'same', 'n08t3', 'same', 'same', bullsh**t)
cAnswer(bulls**t, bulls**t, 'same', 'same', 'rxmj5', 'same', 'same', bullsh**t)
This is a common technique when reading code: strip away everything that does not change, and what is left is the part that carries information. The fifth sub-parameter is unique per option, so it identifies the option. The seventh sub-parameter is n08t3 in every call, so it is shared by all options of the question. A value that is the same for every option of a question is suspicious, because it cannot be telling the page which option was clicked. It must be telling the page something else.
Step 3: identify the answer marker
He compared the calls once more, this time marking the seventh position:
cAnswer(bulls**t, bulls**t, 'same', 'same', 'exy5s', 'same', 'n08t3', bullsh**t)
cAnswer(bulls**t, bulls**t, 'same', 'same', 'z3jpz', 'same', 'n08t3', bullsh**t)cAnswer(bulls**t, bulls**t, 'same', 'same', 'n08t3', 'same', 'n08t3', bullsh**t)←cAnswer(bulls**t, bulls**t, 'same', 'same', 'rxmj5', 'same', 'n08t3', bullsh**t)

Jackpot.
Look at the third call. Its fifth value is 'n08t3' and its seventh value is also 'n08t3'. In every other call the two are different. That is the tell. The seventh value is the identifier of the correct option, and the third call is the correct option, because its own identifier matches the shared value.
Put differently: the page was given a copy of the answer key for each question, and the answer key was written in the same language as the option identifiers. The option whose identifier equals the seventh value is the right one. Because every option's handler carries that value, the correct answer for every question is present in the page source before the user answers anything. The quiz was not hiding the answers; it was handing them over and trusting nobody would look.
Step 4: exploit manually
With the answer value known for each question, the quiz can be completed correctly without knowing the subject matter. The author demonstrates this on a quiz belonging to someone else.

Voila.
You just nailed the quiz of an unknown person, Enjoy!

He names this the Tangled List Bug. He suggests the same method can be used to pass a crush's quiz, which is the motivation he opened the article with: he wanted to come first, and here was a way to come first on any quiz at all.
Step 5: automate it
Reading handlers by hand for every question of every quiz would be slow and tedious. The author automated the process, meaning he wrote a program to do the reading and clicking for him. He does not publish the full script: the code is shown blurred, and he says it is merely 22 lines. His only hint is to take care of time delays and of the loading of DOM objects when clicking the target object.
That hint needs unpacking. A DOM object is one element of the page as the browser sees it: a button, a paragraph, a list item. When a page loads, those elements appear one after another, and a script that clicks too early may try to click something that does not exist yet. A time delay is a pause in the script, a wait of a fraction of a second, to let the page catch up. Without the pause, the automation would misfire.





Code of the exploit, blurred.
He notes that he learned JavaScript through Chrome extensions, including building, packaging and debugging one, and through work on Connect-Me, a FOSSASIA project. A Chrome extension is a small add-on program that runs inside the browser and can read and act on pages. Building one is a practical way to learn JavaScript, the language web pages use.
Step 6: the second bug, without reading the source
The second issue, which he calls the W.T.F. Bug and describes as being for the lazy ones, came from looking at the application's workflow and HTTP responses. It needs no code inspection and takes three steps:
- Generate a Quiz ID and load the quiz in the browser.
- Kill the transmission (he suggests cutting the LAN cable or breaking the WiFi router) and then start clicking options at random. Write down or remember the answers.
- Reconnect the transmission and do the quiz again. This time you have all the answers, and the WeeQuizz server acknowledges the transaction and completes the process.


An HTTP response is the reply a server sends back to the browser when the browser asks for something. Normally, when you click an answer, the browser tells the server what you clicked and the server replies whether it was right. The author's steps have you answer offline, note the answers, then reconnect and submit the quiz, with the server acknowledging the transaction.
In other words, you answer offline, note the answers, then reconnect and submit the quiz. The trick is crude, but it needs no tools and no code, which is why he aimed it at the lazy reader.
Root cause
The core mistake is that the correct answer is shipped to the client inside the page. The server sends all questions and options at once, and each option's cAnswer(...) call includes the answer value as its seventh sub-parameter, so the answer is recoverable from the HTML for every question of any quiz whose ID is known. HTML is the language pages are written in; it is plain text, and anyone can read it. The author's summary is that the target handles sensitive data (the quiz answers) on the client side, which he says is not good for health.
The second bug needs no source reading: you answer offline, note the answers, then reconnect and submit the quiz. The report does not describe any server-side check that would have prevented either behaviour.
A useful comparison: it is like a teacher handing every student a copy of the answer sheet along with the exam, and then being surprised when the class scores full marks. A fix would be to keep the answer sheet on the server rather than hand it out.
Impact
An attacker who can open a quiz can obtain every correct answer from the page source and score perfectly on any quiz, including one belonging to an unknown person. The author frames the impact as destroying the very purpose of making quizzes rather than as catastrophic to the service, and he explicitly warns that a perfect score on a personal online quiz should not be trusted. No user accounts, private data beyond the quiz answers, or server-side access are described as being obtained.
Fix
The report does not say that any fix was made. The author states the bugs were still active when he published, after reporting them by email and receiving no response, including after a reminder four weeks later. A fix would be to stop sending the answer to the client: keep the correct answer on the server and have the server evaluate submitted answers.
Variants to test
These are the same ideas generalised, so you can look for the same pattern on other quiz or survey sites:
- Inspect the
onclickhandlers of quiz or survey options and compare the arguments across options of the same question. A positive result is one argument position that is constant across all options of a question while another position is unique per option: the constant value is a candidate answer marker. - Load a quiz and search the page source for the answer value or for a per-question constant. A positive result is the answer being present in the delivered HTML before any submission.
- Disconnect the network, answer questions and observe whether the page still marks answers correct or wrong. A positive result is local evaluation of correctness while offline, followed by server acceptance of the result after reconnection.
- Check whether the quiz result is submitted as a client-computed score rather than as the individual answers. A positive result is a request whose body contains a score or completion flag that the client controls.
Glossary
- Server: the computer elsewhere that stores data and does the important work for a website.
- Client: the program on your own machine, usually your browser, that displays a website and talks to the server.
- Client side: work done in your browser, on your computer, rather than on the server.
- Server side: work done on the server, out of reach of the browser.
- Sensitive data: information that matters and should be protected, such as passwords, balances or quiz answers.
- Page source: the raw text a server sends to the browser, which the browser turns into the visible page.
- Inspection tools: a panel in the browser, opened with
Ctrl+Shift+Iin Chrome, that shows the code behind a page. - Quiz ID: a short random-looking label that names one particular quiz.
onclickattribute: an instruction attached to a page element saying what code to run when it is clicked.- Function: a named block of code that does something when called.
- Argument: a value handed to a function inside its brackets so it knows what to work on.
- String: a piece of text, such as
'n08t3'. - Identifier: a label a computer uses to tell one thing apart from another.
- Class: a label in a page's structure that groups related elements together, such as
m_question_q_list. - DOM object: one element of a page as the browser sees it, such as a button or a list item.
- Time delay: a deliberate pause in a script so the page has time to finish loading before the script acts.
- Automation: writing a program to do a repetitive task for you.
- JavaScript: the programming language web pages use to run code in the browser.
- Chrome extension: a small add-on program that runs inside the Chrome browser and can read and act on pages.
- HTTP response: the reply a server sends back to the browser when the browser asks for something.
- HTML: the language web pages are written in; it is plain text and anyone can read it.
- Answer marker: a value in the page that identifies which option is correct.
- Tangled List Bug: the author's name for the first bug, where the list of options is tangled up with the answer.
- W.T.F. Bug: the author's name for the second bug, where the page grades answers offline and the server accepts the result later.
- Transaction: one complete exchange between browser and server, such as submitting a finished quiz.
- Root cause: the underlying design mistake that makes a bug possible, as opposed to its visible symptom.