飛
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    ``` ```# 雲嘉資安體驗營 ## 線上會議 - https://ctld.webex.com/ctld-tc/j.php?MTID=m0f11e1ea35bcb4cfc1349d82ac93c003 - 會議號: 2511 403 3165 - 密碼: wcDYARbC472(92392722 來自視訊系統) - 請使用「瀏覽器」登入 - ![](https://i.imgur.com/JQ83Gsw.png) - 輸入姓名、信箱即可 - ![](https://i.imgur.com/D6OiXzW.png) ## 日期 - 2022/03/05 09:30-12:00、15:40-16:30 ## 講師 - 飛飛 - feifei.com.tw - feifei.tw ## Web Security - lab - lab.feifei.tw ## AIS3介紹: 有階段式限制,**須完成前一個才可接續** 1.AIS3 CLUB(資安社團宣導)(幹部聯合) 2.MyFirstCTF 3.AIS3(須通過考核) 4.AIS3 EOF CTF # WEB入門 ## 資安倫理 資安是甚麼? 資訊(的)安全嗎??病毒??駭客?? 妨礙電腦使用罪(刑法第二編第三十六章) 主要:密碼學,系統安全,資訊攻防 BUT 注意法律安全 這些教學皆為理論,但如何使用皆須注意法律問題(白帽、黑帽) ## IF YOU WANT TO *HACK* SOMETHING ?? 如果你覺得有技術卻無處發揮 則: BUG BOUNTY PROGRAMS; [CTFtime](www.ctftime.org) 網路攻防練習手(2017~)(三月底,四月初) ## 網站漏洞原理 ### 假設想偷東西? 網站架構怎麼組成的 -- 基礎建設是否有更新 有多少功能可以使用 -- 功能是否有漏洞漏洞 網站是否有防禦設備 -- 設備是否可繞過 ### 瀏覽器原理 瀏覽器>請求封包>伺服器>取得封包(循環) ### 網頁組成 | 前端 |後端 | | :----: | :----: | | 瀏覽器(client) | 伺服器(server) | | 電腦可見 |背後邏輯 | | cross-site scripting |injection | | HTML/CSS/javaScript | Node.js/PHP/Python | #### 前端技術--CSS ```css= h1 { color: blue; } ``` #### 前端技術--Javascript - Javascript=**DOM**(文件物件模型)+**BOM**(瀏覽器物件模型)+**PL** - 可跟HTML、瀏覽器作互動 #### 前端技術--Static Webpage - 可利用[Github page](https://pages.github.com) - console : javascript #### 後端技術--PHP - 歷史悠久 - 漏洞多 ```php= <?php echo "Hello world" ?> ``` #### 後端技術--資料庫 ```sql= SELECT * FROM TABLE WHERE username = 123; ``` #### 本機技術 伺器軟體--Apache,Nginx,IIS 資料儲存--Database, Cache, File Storage 執行環境--作業系統,雲端環境,容器 #### 瀏覽器 **構建封包給伺服器,交由伺服器回應,也顯示網頁資訊** - [Mozilla Firefox](https://mozilla.org) - [Microsoft Edge](https://www.microsoft.com/zh-tw/edge) - [Google Chrome](https://www.google.com/intl/zh-TW/chrome/) - [Opera](https://www.opera.com/) - [Brave](https://brave.com/) - [DuckDuckGo](https://duckduckgo.com/) ##### 協定 TCP/IP: - 應用層 - 傳輸層 - 網路層 - 連接層 ![](https://i.imgur.com/R04S87Y.png) ### 溝通方式 > 你知道hackmd可以聊天嗎 ``` http:// >> feifei.tw >> :80 >> /study.php >> ?books=brother >> #top 協定 >> >> port ``` #### URL編碼 ``` %20 = " " ``` #### HTTP GET 1.傳送請求 ``` GET /flag.html HTTP/1.1 ``` 傳送請求(參數) ``` GET /flag.php?para=123 HTTP/1.1 ``` 2.回應回傳 ``` HTTP/1.1 200 OK Date: Mon, 27 Jul 2009 12:28:53 GMT Server: Apache/2.2.14 (Win32) Last-Modified: Wed, 22 Jul 2009 19:15:56 GMT Content-Length: 88 Content-Type: text/html Connection: Closeds <html> <body> <h1>Hello, World!</h1> </body> </html> ``` #### HTTP POST ``` POST /flag.php HTTP/1.1 --- header -- username=123&password=qwerty ``` #### Other (http1.1) | Method | 說明 | | :--:|:--:| | get | 取得資料 | | post | 提交指定資源 | | head | 取得標頭(沒有資料) | | options | 取得資源溝通方法 | | put | 取代指定資源 | | delete | 刪除指定資源 | | connect | 和指定資源標明的私服器之間建立隧道 | #### HTTP 狀態碼 | 類別 | 常見 | | :---: | :---: | | 1xx - 資訊回應 | 100 Continue 101 Switching Protocol | | 2xx - 成功回應 | 200 OK | | 3xx - 重定向 | 300 Reirects | | 4xx - 用戶端錯誤 | 401 Unauthoized 403 For Biden 404 Not Found | | 418 - I'm a teapot | The server refuses the attempt to brew coffee with a teapot. | | 5xx - 伺服器錯誤 | 500 Internal Server Error | #### HTTP Cookie **用來記得使用者的資料** - 登入後,伺服器回傳並設置cookie的值 - 再次訪問使用者的請求內會有cookie - 這時候伺服器就透過cookie來對應是哪個使用者 ``` Set-Cookie: FLAG=value ``` **cookie名稱、值、有效期限、其他參數** #### 請求工具 ```bash curl <target URL> ``` #### 攻擊方法 - 主動攻擊 - 直接攻擊脆弱網站 - 植入後門 (EX:[CCU中國文學系](https://zeroday.hitcon.org/vulnerability/search)) - 弱點(未開啟字串偵測): | 動作 | 作法 | | :---: | :---: | | 跟**資料庫**互動 | SQL injection | | 跟**系統**互動 | Command injection | | 跟**信件**互動 | Header injection | | 跟**檔案**互動 | Local File inclusion | | 跟**頁面**互動 | Cross Site Scripting(XSS) | | 跟**後端**互動 | IDOR | ##### SQL injection ```sql -- 我想知道 金額,日期、時間 來自姊姊的豬公 SELECT money,date,reason FROM moneypig where who='sister' --我想知道目前我有多少錢 SELECT SUM(money) FROM myDB.moneypig where who='sister' --以前的萬用解 ' or '1'='1' -- ``` - 被動攻擊 - 釣魚(Phishing) - Session Hijacking - Cross-site request forgery

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully