###### tags: `ctf` # CTF技巧 ### C遇到pcap檔如何處理(題目要求找出密碼picoCTF2018 admin panel) 使用wireshark開啟,輸入`http.request.method == "POST"` 對篩選出的項目右鍵選擇追蹤TCP流,找出帳號與密碼 ### WEB(Irish Name Repo) 要求登入,PHP弱型別`' OR ''=''--` WEB(Mr.Robots) 到robots.txt查看私密網站 ### 遇到凱薩密碼可直接使用解碼網站 或是寫簡單程式 ```cpp #include <iostream> #include<cstring> using namespace std; int main() { char tab[50]; cin>>tab; for(int i=0;i<strlen(tab);i++) cout<<char(tab[i]+移動位數);//以ASCII方式加密 return 0; } ``` ### 瀏覽器偽裝 點Flag他說 You're not google,我們要偽裝成google來拿到FLag F12點開下面欄位有三個點,選`Network Condition`到最下面的`User agent`,取消勾選並選 `googlebot`,重整 ### Buttons POST以及GET的不同 點第一個按鈕後會到http://2018shell.picoctf.com:7949/button1.php 再點第二個按鈕回http://2018shell.picoctf.com:7949/boo.html 然而我們需要到http://2018shell.picoctf.com:7949/button2.html 第一個按鈕的原始碼為 ```htmlmixed= <form action="button1.php" method="POST"> <input type="submit" value="PUSH ME! I am your only hope!"/> </form> ``` 檢查後從NETWORK的HEADER 可以發現他的HTTP請求為POST 第二個按鈕原始碼 ```htmlmixed= <div> You did it! Try the next button: <a href="button2.php">Button2</a> </div> ``` 從檢視中可以看見他的請求為GET 我們需要將他的請求改成POST 在檢視中找到body,對裡面的div右鍵`edit as html`貼上下面程式碼 ```htmlmixed= <form action="button2.php" method="POST"> <input type="submit" value="PUSH ME! I am your only hope!"/> </form> ```