1082 第二次社課 === ###### tags: `1082` :::success 簽到: B073040047 楊志璿 B073040032 涂哲誠 B063040059 陳縵欣 B073040019 蔡孟師 B064011007 徐筱媛 B083040021 嚴宇同 B073040050 翁昌閔 B063040027 林浩陽 B083040036 蔡明霖 B063012015 賴亭諭 M083140008 黃警鋒 M083140014 黃晏林 B083040014 陳昱維 B083040037 黃琮閔 B073040062 남정우 B063040013 李洳瑄 B063040050 黃曉敏 B063040046 徐彥庭 M083140001 張郢展 M073040039 簡振宇 D083040008 謝承翰 B073040031 葉星佑 M083040031 許雅雯 M083140006 莫閔勛 M083140005 曾煜鈞 ::: 講者:splitline slide: https://docs.google.com/presentation/d/136CBfBTR41TKCRlYy4bESIGiAXIXq63BYmkt08B33y0/edit?usp=sharing ### SSH tool * [putty](https://www.putty.org/) * install link: https://the.earth.li/~sgtatham/putty/latest/w64/putty-64bit-0.73-installer.msi GET:顯示在URL上 POST:顯示在Request 的body ### Request * Referer:從哪個網址到目前的網址 * Body: Post data ### Response * Status code * 2XX:正常 * 3XX:重新導向 * 4XX:使用者端錯誤 (e.g. 常見的404, 403) * 5XX:伺服器錯誤 (e.g. 常見 500, 502) * Header * 日期、使用何種Server、內容長度、內容型態等 * Body * 檢視原始碼的部分 ### 看 Request 和 Response 資訊的方法 * Browser 的 F12 -> Network * curl 指令 (curl 網址 -i) * -I 是 HEADER * -I, --head (HTTP FTP FILE) Fetch the headers only! HTTP-servers feature the command HEAD which this uses to get nothing but the header of a document. When used on an FTP or FILE file, curl displays the file size and last modification time only. * [httpie](https://httpie.org/) * [Burpsuite (軟體)](https://portswigger.net/burp) * >[name=SCC] 免費的有限制功能 ### 發 request 的方法 * curl * -X * --data * --cookie * HackBar * Bursuite ### Cookie * http 是 stateless,所以需要 cookie 紀錄狀態 ### Session * cookie 紀錄 session id (user side) * server 存資料 (用 session id 識別) ## web 安全 ### 攻擊思路 1. web 環境 * server? * 什麼程式語言 * 什麼框架 2. 找洞 3. 攻擊 ### Recon 去哪找? google hacking :smile: ### Bug bounty https://github.com/splitline/PHPFuck ### PHP * weak type ### JS * weak type ## Lab ### [lab] how2http * Method:GET、POST、PATCH * HINT:使用 curl 指令 ### [lab] SMMC * HINT:robots.txt * HINT:.git ### [lab] guess-time * HINT:PHP Weak type --- 頁尾交流區 > Meow [name=splitline] >> Meow meow [name=SCC] >> 喵 >> 喵喵醬.jpg ![](https://truth.bahamut.com.tw/s01/201809/b5f1d7b040fc61f09d05e2f222e8f80b.JPG) ![](https://i.imgur.com/8E2EQZd.png) > Lab 在哪裡解r > https://isc.taiwan-te.ch/scoreboard/ > [name=SCC] 這不是我貼的...... > 這題的 .DS_Store 能用ㄇ 看講師用 .git 去抓 > 看他有沒有使用MAC環境下開發,若有則有可能出現 > 這題是抓得到的,應該有吧(? 雖然我用 .git 解掉了XD > slider php那頁,friendly打錯ㄌ