You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
File write operations (hence takeover) fails on PostgreSQL 9.1.5 with an error on lo_export():
[20:47:01] [PAYLOAD] 1;SELECT lo_export(2008, '/tmp/test123.txt')--
[20:47:01] [WARNING] parsed DBMS error message: 'ERROR: pg_largeobject entry for OID 2008, page 0 has invalid data field size 2378'
This happens also if connected as postgres with psql to the database locally. Same statements worked on PostgreSQL 9.1.11.
Hi!
I encountered this problem with PostgreSQL 9.1.16 and 9.1.18 (64 bit).
The strange thing is that SQLMap doesn't output any problem, it says the
right file size on the server (8136 bytes).
But obliviously nothing is working, --os-shell gives no output and
--os-pwn encounters a timeout with all of the available options.
Are you going to fix this soon?
Thanks in advance.
Kamulha
—
Reply to this email directly or view it on GitHub #1170 (comment)
.
@Kamulha no. pgsql.inc.php also contains function dbQuery. Concatenate those two files (get_int.php and pgsql.inc.php), modify settings (username, password, port, etc.) and upload them as one file.
Activity
RicterZ commentedon Jun 2, 2015
Hello, I read the document and found:
It means that every block of the data inserted into
pg_largeobjectless than 2kb.So, I think you should split the data:
bdamele commentedon Jun 4, 2015
@RicterZ thanks for trouble-shooting this.
stamparm commentedon Jul 21, 2015
Will deal with it these days
On Jul 21, 2015 9:07 PM, "Kamulha" notifications@github.com wrote:
stamparm commentedon Jul 24, 2015
Couple of related screenshots:
RicterZ commentedon Jul 24, 2015
👍
stamparm commentedon Jul 24, 2015
still have some stuff to do :)
Important additional patch for #1170 (for PgSQL >= 9.0)
stamparm commentedon Jul 24, 2015
Now it should work on both PostgreSQL 8 and >=9 ;)
stamparm commentedon Jul 24, 2015
@Kamulha Maybe you'll have problems with WRITE permissions, but that's maybe.
Combination of https://raw.githubusercontent.com/sqlmapproject/testenv/master/libs/pgsql.inc.php and https://raw.githubusercontent.com/sqlmapproject/testenv/master/pgsql/get_int.php should suffice. You'll have to modify them though (username, password, ...).
stamparm commentedon Jul 24, 2015
@Kamulha no.
pgsql.inc.phpalso contains functiondbQuery. Concatenate those two files (get_int.phpandpgsql.inc.php), modify settings (username, password, port, etc.) and upload them as one file.stamparm commentedon Jul 24, 2015
file size check is broken. its independent of this issue. will check later.
p.s. current implementation just checks whether the "supporting" table(s) have been filled as they should.
stamparm commentedon Jul 24, 2015
I am not sure if I follow. Can you please explain what you meant with this last message?
stamparm commentedon Jul 24, 2015
I would say that you have write permission problems. Have you tried to write to e.g. directory
/tmp. I've warned you about thisstamparm commentedon Jul 24, 2015
table "sqlmapfile" does not existis a standard error. Its just cleaning (if exists) the old tablestamparm commentedon Jul 24, 2015
@Kamulha this really doesn't look like a generic case. Not sure how to help you here