Editing Robert'); DROP TABLE Students;--
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
− | + | {{Infobox character | |
| image = Little Bobby Tables.PNG | | image = Little Bobby Tables.PNG | ||
− | | imagesize = | + | | imagesize = |
− | | caption = | + | | caption = First drawn drawing in [[342: 1337: Part 2]]. |
| first_appearance = [[327: Exploits of a Mom]] | | first_appearance = [[327: Exploits of a Mom]] | ||
− | |||
}} | }} | ||
− | < | + | '''<code>Robert'); DROP TABLE students;--</code>''', nicknamed '''Little Bobby Tables''', is the youngest son of elite hacker [[Mrs. Roberts]]. His elder sister is [[Elaine Roberts|Help I'm trapped in a driver's license factory Elaine Roberts]]. His "full" name is known to cause problems with some computers. When he was first enrolled in school ([[327: Exploits of a Mom]]), it exploited a vulnerability in the parsing of students' names into the school's student database resulting in the school losing all the student records for the year. |
− | |||
− | |||
− | ''' | + | In {{w|SQL}}, commands are terminated by semicolons '''<code>;</code>''' and data is often quoted using single quotes '''<code>'</code>'''. Commands may also be enclosed in parentheses '''<code>(</code>''' and '''<code>)</code>'''. Data is stored in tables of similar items (e.g. '''<code>students</code>''') and individual entries are "rows" in the table. To delete an entire table (and every row of data in that table), you use the command '''<code>DROP</code>''' (e.g. '''<code>DROP TABLE students</code>'''). The '''<code>--</code>''' represents the start of a {{w|Comment_(computer_programming)#SQL|SQL comment}} which ensures that the rest of the command is ignored so an error will not occur. |
− | + | The exploited vulnerability is that the single quote in the name input was not properly "escaped" by the software. Thus, when the name is embedded into some SQL statement, the quote is erroneously parsed as a closing quote inside that statement, rather than being parsed as part of the name. Lack of such escaping is a common SQL vulnerability; this type of exploit is referred to as {{w|SQL injection}}. | |
− | |||
− | |||
− | |||
− | + | The name Bobby Tables inspired a website, [http://bobby-tables.com/ bobby-tables.com], a guide for beginning programmers to learn the right way to avoid SQL injection in their code. A similarly named character, Mister Rogers, appears in [[884: Rogers St.]], with the same code injection in his middle name. It appears in [[1253: Exoplanet Names]] as one of the suggested planet names. | |
− | == | + | == Appearances == |
− | In | + | In the five comics he is referenced he is only drawn three times. The first two is in the [[:Category:1337|1337 series]] where he is drawn as a Cueball-like kid. See picture above. But then he also appears as a young man with long curly hair, looking very much like a woman in [[884: Rogers St.]] Here it is only the title text that reveals that this is Bobby, that and the fact that [[Randall]] in the official transcript does not mention the sex, but only that it is a person. |
− | + | Here is how he looks in that comic:<br> | |
+ | [[File:Adult Bobby Tables.PNG]] | ||
− | + | There have been suggestions that the Robert in the table in [[596: Latitude]] was Bobby, but given that [[Black Hat]] has never had any relation to him in the other comics, and that [[Rob]] has, it seems more likely that the Robert is Rob. | |
− | + | == Example of SQL injection == | |
A typical, unsecured SQL command vulnerable to SQL injection would be something like: | A typical, unsecured SQL command vulnerable to SQL injection would be something like: | ||
− | database.execute("INSERT INTO | + | database.execute("INSERT INTO students (name) VALUES ('" + name + "');"); |
where <code>name</code> is a variable which is filled with the name to be inserted into the database. With a regular name, this would result in the following SQL command to be sent to the database system: | where <code>name</code> is a variable which is filled with the name to be inserted into the database. With a regular name, this would result in the following SQL command to be sent to the database system: | ||
− | INSERT INTO | + | INSERT INTO students (name) VALUES ('Elaine'); |
However, with Little Bobby Tables's full name, the SQL command would be: | However, with Little Bobby Tables's full name, the SQL command would be: | ||
− | INSERT INTO | + | INSERT INTO students (name) VALUES ('Robert'); DROP TABLE students;--'); |
Or, if split after each <code>;</code>: | Or, if split after each <code>;</code>: | ||
− | INSERT INTO | + | INSERT INTO students (name) VALUES ('Robert'); |
− | DROP TABLE | + | DROP TABLE students; |
--'); | --'); | ||
− | The first | + | The first commands inserts the name <code>Robert</code> into the database as in the first example. The second command however completely deletes the table <code>students</code>. The remainder is a comment to prevent syntax errors with the apostrophe and the closing parenthesis. |
− | + | == Real Life occurrence == | |
− | |||
− | In | + | In French-speaking countries, apostrophes are a common character in street names. More often than not, French speakers unwittingly trigger SQL injection bugs when trying to order something from a US shop. In Italy, they are often part of town names, too (e.g. {{w|L'Aquila}}). |
− | |||
− | |||
− | |||
− | |||
+ | ==See also== | ||
+ | *[[:Category:Comics featuring Little Bobby Tables|Comics featuring Little Bobby Tables]] | ||
{{navbox-characters}} | {{navbox-characters}} | ||
[[Category:Characters]] | [[Category:Characters]] | ||
− |