![]() |
MySQL: новый Geometric error-based
Привет!
я не говорю России, так что я собираюсь объяснить это на английском языке. ;) earlier today, i got some spare time, and played a little with the function GeometryCollection(). basically, this function constructs geometry collection. sounds nice. but the interesting part is, we can only use it with adjusted function, like point(x,y). for example- PHP код:
PHP код:
now lets try it without POINT()- PHP код:
we got an error on our x argument, 53. GeometryCollection() cant process this, because GeometryCollection() dont know how to recognize x,y. after i saw that, i thought "why stop here?", maybe i can play with this a little more. so, as expected (:)) i tried to pull out the version, like that- PHP код:
but wait, if we can see the alias, so maybe NAME_CONST() will do the trick? well, no. theoretically yes, but the problem is we cant call it. from here, the way to exploitation was really short- PHP код:
lets try pull out more stuff, maybe some columns from mysql.user- PHP код:
|
other functions that works, than GeometryCollection()-
linestring(), multipoint(), multilinestring() and multipolygon(). PHP код:
|
Копался в исходниках по поводу этого вектора, нашел еще один убогий и неюзабельный)
Из плюсов относительного обычного "XPATH error" - чуть большая длина полезных данных (48 против 31). Так, чисто в образовательных целях) Код:
SELECT EXTRACTVALUE(0,CONCAT(hex(hex(version())),repeat(0,500),'.')); |
narrowing down a bit-
since name_const() allow us to give a numeric alias, we can use this simple trick- PHP код:
|
На mysql 5.6.20 не срабатывает двойной select*from :(
А name_const не прокатит для обычных запросов Код:
SELECT GeometryCollection((select*from(select*from(select@@version)f)x)); |
Часовой пояс GMT +3, время: 08:04. |
Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd. Перевод: zCarot