A
A
akyl-kb2016-07-31 09:30:43
PHP
akyl-kb, 2016-07-31 09:30:43

How to inject through UNION SELECT?

url: http://mysite.ru/news.php?id=-1 UNION SELECT 1,2,3,4
->
php: $query = "SELECT * FROM news WHERE id=". $_GET['id'];
->
sql: SELECT * FROM news WHERE id=-1 UNION SELECT 1,2,3,4

Tried:
LOAD_FILE()
SELECT INTO OUTFILE
SELECT INTO DUMPFILE
Doesn't work, there are limitations
Is it possible somehow to inject through select update, delete, etc?
DB: MariaDB 10.1

Answer the question

In order to leave comments, you need to log in

2 answer(s)
X
xmoonlight, 2016-07-31
@xmoonlight

stackoverflow.com/questions/5759603/mysql-injectio...

N
none7, 2016-07-31
@none7

Neither UPDATE nor DELETE can be done through SELECT ... UNION. And since access to files is denied, the only thing you can do is to pull out all the data available to you from the database. Through nested queries.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question