天天看點

一次滲透注入getshell提權

注入

1)網站首頁

一次滲透注入getshell提權

2)簡單and 1=1 ,1=2判斷注入點

一次滲透注入getshell提權
一次滲透注入getshell提權

3)order by 确定字段數為9,顯示位union select 1,2…判斷為4和8

一次滲透注入getshell提權

4)判斷權限

一次滲透注入getshell提權

root權限,思考使用into outfile直接寫shell或者是外聯資料庫,使用日志getshell

5)into outfile寫shell。判斷mysql版本為5.5,既必須檢視secure-file-priv導出路徑與網站的絕對路徑

一次滲透注入getshell提權

網站報錯無法看到絕對路徑

一次滲透注入getshell提權

使用 select @@basedir;讀取mysql路徑猜測絕對路徑

一次滲透注入getshell提權

6)查詢mysql密碼,外聯資料庫。日志寫shell

嘗試外聯 GG隻能從背景入手了

一次滲透注入getshell提權
一次滲透注入getshell提權

7)簡單的擷取到背景賬号密碼

一次滲透注入getshell提權

getshell

1)登入背景

一次滲透注入getshell提權

卡死的背景

2)上傳shell,發現編輯應該是KindEdit,這個除了.net貌似無解了。

一次滲透注入getshell提權

翻來翻去沒找到其他上傳點。

3)柳暗花明

突然想起路徑爆的404,這種一般是iis7.x,嘗試解析漏洞/.php

一次滲透注入getshell提權

over

提權

1)檢視簡單資訊

一次滲透注入getshell提權

systeminfo不能使用,猜測有殺軟 360全家桶

一次滲透注入getshell提權

2)前面是root權限,便想使用udf提權,secure-file-priv禁止導出,便直接将udf丢在插件目錄

一次滲透注入getshell提權

再進行手工建立cmd函數 不幸被殺,以為360不殺udf

一次滲透注入getshell提權

3)前面看到為内網機子,不提權也能幹内網,那就先搞内網,使用亮神的白名單執行payload(基于白名單 Msbuild.Exe 執行 Payload 第一季),該環境裝有.net4.0。生成好後,msf上線

使用免費的ngrok穿透。

一次滲透注入getshell提權
一次滲透注入getshell提權

4)添加路由表,内網開始梭

一次滲透注入getshell提權

5)簡單開始掃存活

一次滲透注入getshell提權

掃不到,猜測做了政策,便放棄了内網的掃描

6)掃不了内網,就隻有去提權了,檢視權限, 發現爛洋芋可以提

一次滲透注入getshell提權

7)簡單做了個洋芋的免殺,再向别人要了個getpass

一次滲透注入getshell提權

8)使用msf自帶的portfwd,将内網端口轉發到kali上

一次滲透注入getshell提權

網站太卡就沒登入了。(又是白嫖的ngrok)

繼續閱讀