quentinhardy / odat

ODAT: Oracle Database Attacking Tool
1.62k stars 344 forks source link

dbmslob doesn't read complete file #16

Closed omair2084 closed 6 years ago

omair2084 commented 6 years ago

The code in the dbmslob module doesn't really read the entire file because it goes word by word and messes up somewhere. A simple way to check, is to read the /etc/passwd file and it fails to read the entire file.

                          IF (l_end = 0) THEN
                                l_end := DBMS_LOB.INSTR(l_loc,l_sen,l_pos,1);
                                l_sum := l_end - l_pos ;
                                DBMS_LOB.READ(l_loc,l_sum,l_pos,l_buf);
                                dbms_output.put_line(UTL_RAW.CAST_TO_VARCHAR2(l_buf));
                                EXIT;
                         END IF;

Commenting EXIT line from this code results in display of the entire file but naturally an exception occurs.

This was tested on the x64 precompiled binary.

quentinhardy commented 6 years ago

Thank you.