Ethen Tso
    • 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
    20181227 橘子大大講挖🐛🐛換💰💰 ===== 台科大資安研究社 【 107-1 第十二次社課——挖洞洞換錢錢!】 ■ 時間:12/27 (四) 19:00-21:00 ■ 地點:TR-309 ■ 講師:Orange https://www.facebook.com/ntust.hacking/photos/a.1623576601227886/2188357831416424/ {%hackmd AllzV6PnT-uf-VDwmid5Jw %} ![](https://scontent.ftpe8-1.fna.fbcdn.net/v/t1.0-9/48408689_2188357834749757_1730869337796902912_o.png?_nc_cat=108&_nc_ht=scontent.ftpe8-1.fna&oh=58abde347ac32ec1281beb0c453a320a&oe=5C911422) ## 開始 **Red Team** 全範圍的弱點檢測與測試 **Bug Bounty** 在官方所提供的規則範圍下,讓獨立研究人員可以自由尋找系統漏洞並提供獎勵 真實的攻擊但又不會損害企業利益,比傳統PT來說面向更廣泛 **PT** 對特定目標進行詳細且深入的滲透測試,範圍明確 https://hackerone.com/reports/391217 阿喵: 老司機想要挖漏洞有這四個 program 可以玩喔( * https://hackerone.com/pornhub * https://hackerone.com/redtube * https://hackerone.com/youporn * https://hackerone.com/chaturbate 台灣的Bug Bounty https://zeroday.hitcon.org/ ## 流派 * 邏輯漏洞流(改錢流) * 前端安全流(XSS) * DNS流(自動化流程) * 後端安全流 ### 邏輯漏洞流(改錢流):最容易第一步找到的 * 改錢 * 平行權限 * 垂直權限 * 商業邏輯漏洞 改錢 改金額、改數量、加減乘除、進階 [HMAC](https://zh.wikipedia.org/wiki/%E9%87%91%E9%91%B0%E9%9B%9C%E6%B9%8A%E8%A8%8A%E6%81%AF%E9%91%91%E5%88%A5%E7%A2%BC) 平行/垂直權限 任意刪照片、幫別人發文、變身成其他人 舉個🌰 噗浪,使用Burp getFriends: offset/limit/user_id <- 如果換掉會怎樣? delete post: plurk_id <- 如果換成別人的文章編號會怎樣? 某通訊軟體:大頭貼雖然只有提供上傳功能,但實際上有沒有被記錄的delete api point 換掉user uuid就可以發動攻擊換掉別人的頭貼 商業邏輯漏洞 * 驗證碼破解 https://www.tnpd.gov.tw/chinese/home.jsp?serno=201012130068&mserno=201012130066&menudata=TncgbMenu&contlink=ap/mail4.jsp&level2=Y * ![](https://images.plurk.com/59LtNUts2JvXEPEdyml3j6.png) * 亂數有規律、定單流水號 * 灌票 / 密碼加密 * 找回密碼流程 * FB * 重設密碼漏洞 - 重設密碼時的驗證碼可被暴力破解嗎? * beta.facebook.com 沒有加上rate limit * 中O電信 * 使用密碼提示來設定新密碼 * 使用常用信箱取得密碼 * 錢 _ KTV * 綁定手機app與密碼,可以遙控特定包廂點歌喀歌 * LoginKey A-Z0-9 1679616種組合 * ASP.NET web service * 有個API可以查到密碼 * RoomNo好解決,BillNo: 1605170010 年月日流水號 * 可以幫任意包廂點歌跟發訊息XD * 不會消失的訊息:「不客氣,啾咪^_<」 * Fuzzy了所有字元,只有底線有問題,有可能是後端分隔字元用的是底線 * 社交工程 ### 前端安全流 * XSS * 到處插 "><script>alert("1")</script>" * svg/onload * http://orange.tw/xss_example * 如何跳窗? * 如何繞過Chrome XSS Auditor? * 網址內若有危險pattern又出現在網頁內,就會被Chrome攔截 * 看情況做事 不是正常顯示的ascii code * 丟奇怪的字元,JSON自動encode了起來,造成一點不同,進一步繞過XSS Auditor * 過濾雙引號,又用雙引號擋起來 * hidden field * tag優先權:即便在雙引號裡面,iframe frame script的優先權還是比較高,會優先被瀏覽器解釋,這個弱點拿了五萬台幣 * 如何更進一步利用? * 子域名下的XSS * 只能偷Cookie * 無法取得secure.lemon.com or *.lemon.com [CORS保護](https://developer.mozilla.org/zh-TW/docs/Web/HTTP/CORS) * 但可以幫父Domain設定cookie...奇妙 * 如何更進一步利用? * oauth讓你可以用FB或Google認證,就不用自己架會員系統 * redirect_uri如果可以被竄改就可以偷cookie, 是很嚴重的漏洞 * accessToken - App有這組認證就可以隨時存取你授權的資料,所以如果你沒有用這個app的話,記得要去刪掉。取得這組token的人就可以利用你的身份 * 立馬拍照XD * 訪問時會設定一組CSRF Token於Cookie/Session中,防止CSRF攻擊 * 子域名下可以透過JS去做,自己設定父域名的cookie然後自己打oauth request, 誘使點擊同意,完成操作取得token * 進一步:持久化:試圖取得AccessToken * 跳轉的時間太短無法控制,js可能還來不及執行 * cookie bomb - 設置太大的cookie可能對方Server會拒絕,導致跳轉到413/400 error code,跳轉就會被終止,你就可以去撈👍 * CSRF * HTML Injection * ...... ### 自動化流 * 慢慢列域名掃 * Google hacking, whois, subdomain bruitforce, ip, ssl cert, ... * 自動打自動送bug bounty XD * crt.sh : 列出網域跟憑證,可以以此開始挖弱點 #### 子域名劫持 雲端服務想要使用自己的域名,如github pages 如果github repo被移除了,我建立一個新的repo並設定相同的cname.. xXx: 透過 crt.sh 發現某個s3 bucket,但aws上已經刪除。我可以註冊一個自己的bucket來劫持這個域名 ### 後端安全流 * 打進伺服器就對了,比較硬,但很有效 * globalsight.xxxxxxx.com * google hacking * 找到source code, code review * Java的應用 * 下往上:找到危險的函數 * 上往下:找他的入口點與參數,看會不會進入到危險的函數裡 * web.xml * 自己架一套,找到方法黑了他,對正式主機比照辦理 * 找到一個函數有寫入檔案,寫檔的路徑與內容皆從Request來,還不用過認證,抓到啦 * 利用這個弱點寫入一隻jsp後門 ## 總結 花時間下去就對了 一整天去把每個參數都家XSS 一整晚把ID改成別人的

    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