某天,碰到一台india的ORACLE伺服器,從遠端桌面可以知道,這又是一台域控下的工作機。
<a target="_blank" href="http://blog.51cto.com/attachment/201107/163835946.jpg"></a>
檢測ORACLE使用者得到下列結果:
[-] Loading services/sids from service file
[-] Checking sid (ORCL) for common passwords
[-] Account SCOTT/TIGER found
[-] Enumerating system accounts for SID (ORCL)
[-] Succesfully enumerated 24 accounts
[-] Checking user supplied passwords against sid (ORCL)
[-] Checking user supplied dictionary
[-] Account TKELLY/TKELLY found
[-] Account WEBSCANET1/WEBSCANET1 found
[-] Account MDDATA/MDDATA is locked
[-] Account MDSYS/MDSYS is locked
[-] Account SI_INFORMTN_SCHEMA/SI_INFORMTN_SCHEMA is locked
[-] Account ORDPLUGINS/ORDPLUGINS is locked
[-] Account ORDSYS/ORDSYS is locked
[-] Account OLAPSYS/OLAPSYS is locked
[-] Account XDB/XDB is locked
[-] Account CTXSYS/CTXSYS is locked
[-] Account EXFSYS/EXFSYS is locked
[-] Account WMSYS/WMSYS is locked
[-] Account TSMSYS/TSMSYS is locked
[-] Account DMSYS/DMSYS is locked
[-] Account DIP/DIP is locked
[-] Account OUTLN/OUTLN is locked
有3個使用者可以連接配接,其他都LOCKED了。分别用三個使用者登陸檢查,資料庫版本是10.2.0.1.0
<a href="http://blog.51cto.com/attachment/201107/165623974.jpg" target="_blank"></a>
3個使用者都不是DBA權限,
<a target="_blank" href="http://blog.51cto.com/attachment/201107/163942394.jpg"></a>
不能調用JAVA,就建立不了WINDOWS系統使用者,登陸不了遠端桌面。縷了下思路,決定先用TKELLY連接配接資料庫,看什麼情況再說。資料庫裡有個USERMASTER的表,
<a target="_blank" href="http://blog.51cto.com/attachment/201107/164000329.jpg"></a>
看字面意思是放管理者資訊的,打開看看,果然就是
<a target="_blank" href="http://blog.51cto.com/attachment/201107/164033477.jpg"></a>
但密碼是經過40位MD5加密的,然後發帖求破解,未果。。。
那就隻有看能否通過ORACLE注入來提升DBA權限。因為10G以上的版本提升權限都很艱難,不象8I或9I版本相對容易些,于是網上查找了近10種方法:
SQL Injection in SYS.LT.COMPRESSWORKSPACETREE
SQL Injection in MDSYS.SDO_TOPO_DROP_FTBL
SQL Injection in SYS.LT.MERGEWORKSPACE
SQL Injection in SYS.LT.REMOVEWORKSPACE
Buffer Overflow in xdb_xdb_pitrig_pkg
PLSQL Injection in xdb_xdb_pitrig_pkg
PLSQL Injection in pitrig_truncate
<a target="_blank" href="http://blog.51cto.com/attachment/201107/164143302.jpg"></a>
以上方法全部失敗,這中間的艱辛,隻有實際操作過的童鞋明白,誰試誰知道啊。。。我都接近崩潰邊緣。。。看着還剩幾條語句,就繼續下去,
當試到SQL Injection in SYS.LT.FINDRICSET with IDS Evasion 時
<a target="_blank" href="http://blog.51cto.com/attachment/201107/164208576.jpg"></a>
提示成功了,趕緊檢視SCOTT使用者,OK,有DBA了。
<a target="_blank" href="http://blog.51cto.com/attachment/201107/164232293.jpg"></a>
最艱難的關口終于通過了,接着調用JAVA運作指令
<a target="_blank" href="http://blog.51cto.com/attachment/201107/164311119.jpg"></a>
建立系統測試使用者TEST,并加入管理者組
<a target="_blank" href="http://blog.51cto.com/attachment/201107/164356685.jpg"></a>
這樣就順利登陸遠端桌面了
<a target="_blank" href="http://blog.51cto.com/attachment/201107/164429956.jpg"></a>
用NET VIEW檢視,工作組内有多台主機。
<a target="_blank" href="http://blog.51cto.com/attachment/201107/164606284.jpg"></a>
至于如何滲透,以前的博文已寫過,這裡就不再重複。測試完畢,退出桌面,在ORACLE指令行下,删除剛才建立的TEST使用者。
<a target="_blank" href="http://blog.51cto.com/attachment/201107/164700625.jpg"></a>
結束了這次ORACLE 10G版本的提升DBA測試。
本文轉自enables 51CTO部落格,原文連結:http://blog.51cto.com/niuzu/607657,如需轉載請自行聯系原作者