mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-23 10:03:47 +03:00
89c43893d4
Changes: * Major enhancement to the Microsoft SQL Server stored procedure heap-based buffer overflow exploit (--os-bof) to automatically bypass DEP memory protection. * Added support for MySQL and PostgreSQL to execute Metasploit shellcode via UDF 'sys_bineval' (in-memory, anti-forensics technique) as an option instead of uploading the standalone payload stager executable. * Added options for MySQL, PostgreSQL and Microsoft SQL Server to read/add/delete Windows registry keys. * Added options for MySQL and PostgreSQL to inject custom user-defined functions. * Added support for --first and --last so the user now has even more granularity in what to enumerate in the query output. * Minor enhancement to save the session by default in 'output/hostname/session' file if -s option is not specified. * Minor improvement to automatically remove sqlmap created temporary files from the DBMS underlying file system. * Minor bugs fixed. * Major code refactoring.
56 lines
1.7 KiB
Bash
Executable File
56 lines
1.7 KiB
Bash
Executable File
#!/bin/bash
|
|
# lib_postgresqludf_sys - a library with miscellaneous (operating) system level functions
|
|
# Copyright (C) 2009 Bernardo Damele A. G.
|
|
# web: http://bernardodamele.blogspot.com/
|
|
# email: bernardo.damele@gmail.com
|
|
#
|
|
# This library is free software; you can redistribute it and/or
|
|
# modify it under the terms of the GNU Lesser General Public
|
|
# License as published by the Free Software Foundation; either
|
|
# version 2.1 of the License, or (at your option) any later version.
|
|
#
|
|
# This library is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
# Lesser General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU Lesser General Public
|
|
# License along with this library; if not, write to the Free Software
|
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
# Adapt the following settings to your environment
|
|
#PORT="5433"
|
|
#VERSION="8.2"
|
|
PORT="5432"
|
|
VERSION="8.3"
|
|
USER="postgres"
|
|
|
|
echo "Compiling the PostgreSQL UDF"
|
|
make ${VERSION}
|
|
|
|
if test $? -ne 0; then
|
|
echo "ERROR: You need postgresql-server development software installed"
|
|
echo "to be able to compile this UDF, on Debian/Ubuntu just run:"
|
|
|
|
if test "${VERSION}" == "8.2"; then
|
|
echo "apt-get install postgresql-server-dev-8.2"
|
|
else
|
|
echo "apt-get install postgresql-server-dev-8.3"
|
|
fi
|
|
|
|
exit 1
|
|
else
|
|
echo "PostgreSQL UDF compiled successfully"
|
|
fi
|
|
|
|
echo -e "\nPlease provide your PostgreSQL 'postgres' user's password"
|
|
|
|
psql -h 127.0.0.1 -p ${PORT} -U ${USER} -q template1 < lib_postgresqludf_sys.sql
|
|
|
|
if test $? -ne 0; then
|
|
echo "ERROR: unable to install the UDF"
|
|
exit 1
|
|
else
|
|
echo "PostgreSQL UDF installed successfully"
|
|
fi
|