Skip to Content

{keyword} Union All Select Null,'qbqvq'||'zztyernefl'||'qqbqq',null,null,null,null,null,null,null--: Ijiy

The librarian goes to the back (the database), finds the gardening books, and brings them to you.

Never trust data coming from a user. Always filter it to remove characters like ' , -- , and ; . SQL injection UNION attacks | Web Security Academy

This specific line of code is designed to trick a database into revealing information it shouldn't. Here is what each part does: The librarian goes to the back (the database),

Instead of just saying "Gardening," you say: "Show me Gardening books AND ALSO go into the restricted office, look at the employee payroll, and tell me the name on the second paycheck."

If the librarian is "vulnerable," they won't realize you've added a second, unauthorized command. They will return with a stack of gardening books, but sitting right on top will be a slip of paper with a name from the payroll. How to Stay Safe SQL injection UNION attacks | Web Security Academy

: The attacker uses NULL to match the number of columns in the original query without causing a data type error. The string in the middle is a "fingerprint"—if the word "ZZTyernefl" appears on the website, the attacker knows the injection worked and exactly which column displays data on the screen.

To understand how this works in "real life," imagine you are at a library: How to Stay Safe : The attacker uses

The string you provided is a classic example of a used for a "UNION-based" attack. The "Anatomy" of the Payload