Awwwolf
    • 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
    # Cross-site scripting(XSS) [TOC] ![](https://hackmd.io/_uploads/HJ4IlPxSh.png) <p class="text-right" style="color:blue"> 資料來源 : https://portswigger.net/web-security/cross-site-scripting </p> ### XSS between HTML tags 可以在 HTML 中塞入一些有用的 JavaScipt 來執行 : ```javascript= <script>alert(document.domain)</script> <img src=1 onerror=alert(1)> ``` ![](https://hackmd.io/_uploads/H1YY8_gB2.png) ### 某個技巧 在 JS string 中為了預防 input 塞入 ```'```,所以用 ```\``` 來告訴 JS 這是字符 ### DOM XSS 利用 ```<img src=0 onerror=alert(1)>``` 在 ```<span></span> ``` 底下執行 ### DOM-based XSS DOM-based XSS漏洞通常出現在JavaScript從可受攻擊者控制的來源(例如URL)中提取數據並將其傳遞給支持動態代碼執行的漏洞來源(例如eval()或innerHTML)的情況下。這使得攻擊者能夠執行惡意JavaScript代碼,通常允許他們劫持其他用戶的帳戶。 要進行DOM-based XSS攻擊,您需要將數據放入一個來源,以便將其傳播到漏洞來源並導致任意JavaScript代碼的執行。 DOM XSS最常見的來源是URL,通常使用window.location對象來訪問。攻擊者可以構建一個鏈接,將受害者導向到一個帶有查詢字符串和URL片段的易受攻擊頁面。在某些情況下,例如當攻擊目標是404頁面或運行PHP的網站時,有效載荷還可以放置在路徑中。 ## [利用跨站腳本攻擊漏洞](https://portswigger.net/web-security/cross-site-scripting/exploiting) 證明你已經發現一個跨站腳本攻擊漏洞的傳統方法是使用 alert() 函數創建一個彈出窗口。這不是因為 XSS 與彈出窗口有什麼關係,而只是一種證明你可以在給定域上執行任意 JavaScript 的方法。你可能會注意到有些人使用 alert(document.domain)。這是一種明確指出 JavaScript 執行在哪個域(domain) 上的方式。 有時你可能想進一步證明 XSS 漏洞是一個真正的威脅,提供一個完整的利用方式。在本節中,我們將探討三種最流行和強大的利用 XSS 漏洞的方法。 ### 利用跨站腳本攻擊來竊取 cookie 竊取 cookie 是利用 XSS 的一種傳統方式。大多數 Web 應用程序使用 cookie 來進行會話處理。你可以利用跨站腳本漏洞將受害者的 cookie 發送到自己的域,然後手動將 cookie 注入瀏覽器並冒充受害者。 在實際操作中,這種方法有一些顯著的限制: - 受害者可能沒有登錄。 - 許多應用程序使用 HttpOnly 標誌將 cookie 從 JavaScript 中隱藏起來。 - 會話可能被鎖定到額外的因素,例如用戶的IP地址。 - 會話可能在你能夠劫持之前超時。 [LAB-Exploiting cross-site scripting to steal cookies]() ### 利用跨站腳本攻擊來獲取密碼 如今,許多用戶使用自動填充密碼的密碼管理器。你可以利用這一點,創建一個密碼輸入框,讀取自動填充的密碼,並將其發送到自己的域。這種技術避免了大部分與竊取 cookie 相關的問題,甚至可以獲取受害者在其他所有帳戶中重複使用的相同密碼。 這種技術的主要缺點是它只對那些使用自動填充密碼的用戶有效。(當然,如果用戶沒有保存密碼,你仍然可以嘗試通過現場釣魚攻擊獲取他們的密碼,但這並不完全相同。) [LAB-Exploiting cross-site scripting to capture passwords]() ### 利用跨站腳本攻擊進行跨站請求偽造(CSRF) 使用跨站腳本(XSS),你可以做任何一個合法用戶在網站上可以做的事情。根據你攻擊的網站,你可能能夠讓受害者發送消息、接受好友請求、在代碼倉庫中提交後門,或者轉移一些比特幣。 一些網站允許已登錄的用戶在不重新輸入密碼的情況下更改他們的電子郵件地址。如果你發現了一個 XSS 漏洞,你可以觸發這個功能,將受害者的電子郵件地址更改為你控制的地址,然後觸發密碼重置來獲得對該帳戶的訪問權限。 這種類型的利用通常稱為跨站請求偽造(CSRF),這可能有點令人困惑,因為 CSRF 也可以作為一個獨立的漏洞存在。當 CSRF 作為一個獨立的漏洞存在時,可以通過使用反 CSRF tokens 等策略來修補它。然而,如果還存在 XSS 漏洞,這些策略將無法提供任何保護。 [LAB-Exploiting XSS to perform CSRF]() <p class="text-right"> --by ChatGPT翻譯 </p> ## APPRENTICE ### Lab: Reflected XSS into HTML context with nothing encoded --2023/05/16 題目說,透過 反射型 XSS 攻擊 search function,提示使用 alert function ![](https://hackmd.io/_uploads/SJs1H_xBn.png) 在 search 那邊塞入 ```<script>alert(1)</script>``` ![](https://hackmd.io/_uploads/B1V7UuxHh.png) 然後會跳出 alert 視窗,就成功啦 OVO ![](https://hackmd.io/_uploads/BkuS8OeH2.png) successful ![](https://hackmd.io/_uploads/Bycg8deS2.png) ### Lab: Stored XSS into HTML context with nothing encoded --2023/05/16 題目要我們用 XSS 攻擊,讓網站呼叫 ```alert``` function ![](https://hackmd.io/_uploads/r10CEPxrh.png) 部落格底下可以輸入,我們在 comment 塞入 ```<script>alert(1)</script>``` 測試看看,剩下的隨便填 ![](https://hackmd.io/_uploads/Bk-oPveB2.png) 提交後,直接跳出 successful,沒關係我們返回 blog 確認 ![](https://hackmd.io/_uploads/SJomOvlS2.png) 確實跳出 alert 視窗 OVO ![](https://hackmd.io/_uploads/S148_wlSn.png) ### Lab: Reflected XSS into attribute with angle brackets HTML-encoded --2023/05/16 透過反射型 XXS 攻擊將 alert 注入 HTML 中 (簡單來說啦 ![](https://hackmd.io/_uploads/HkC7dugrh.png) 先在 search 塞入 OVO,看看會怎樣, 所以我們需要 ```"``` 來隔開要塞入的 script ![](https://hackmd.io/_uploads/SynMrqgB3.png) ```OVO" onmouseover="alert(1)``` 塞入 onmouseover,只要鼠標移到元素上就會觸發該事件。 ![](https://hackmd.io/_uploads/BywwL9lrh.png) 因為觸發 onmouseover 的緣故,只要滑鼠移到 search,就會跳出 alert 視窗, successful ![](https://hackmd.io/_uploads/SkatUqgr2.png) ### Lab: Stored XSS into anchor href attribute with double quotes HTML-encoded --2023/05/16 這次要用儲存型 XSS 攻擊,在 author name 的連結呼叫 alert ![](https://hackmd.io/_uploads/Sy6U_qeB3.png) 在回應留言的地方隨便輸入,但在 website 的部分插入 css 試試看 ![](https://hackmd.io/_uploads/Sysk2ceSn.png) 結果網址直接把它貼上,所以留下 javascript 的部分就好 ![](https://hackmd.io/_uploads/S1pe29xHh.png) again ![](https://hackmd.io/_uploads/ByqbnqgB2.png) 成功啦 ![](https://hackmd.io/_uploads/rJxfhceH2.png) successful ![](https://hackmd.io/_uploads/HyOX3qeBh.png) ### Lab: Reflected XSS into a JavaScript string with angle brackets HTML encoded --2023/05/17 用反射型 XSS 攻擊 search 來使 JS string 呼叫 alert function ![](https://hackmd.io/_uploads/S1QQXAeSn.png) 使用 ```'-alert(document.domain)-'``` ![](https://hackmd.io/_uploads/SkGSKh-S2.png) 成功呼叫 alert ![](https://hackmd.io/_uploads/BJHFFhZH3.png) 換另一個方法 ```';alert(document.domain)//``` ![](https://hackmd.io/_uploads/BJKat2-r2.png) 成功呼叫 alert ![](https://hackmd.io/_uploads/ByCCt3bS3.png) successful ![](https://hackmd.io/_uploads/rypi_2WSh.png) ### Lab: DOM XSS in document.write sink using source location.search --2023/05/19 這個實驗室包含一個在搜尋查詢追踪功能中的DOM-based跨站脚本攻擊漏洞。它使用了JavaScript的document.write函数,該函数會將數據寫出到頁面中。document.write函数會使用來自location.search的數據,您可以使用網站的URL來控制該數據。 要解決這個實驗室,需要執行一個跨站脚本攻擊,調用alert函数。 <p class="text-right"> --by ChatGPT </p> ![](https://hackmd.io/_uploads/Hy5gzbMrn.png) 可以看到藍色框起來的部分是 js,然後是 document.write() 來呼叫 <img src=".....">,接著在下那一行 ```<img src="/resources/images/tracker.gif?searchTerms=OVO">``` 表示輸入會被放進 ```searchTerms``` 裡面,如果我們想要呼叫 ```alert```,要跳脫 ```img src``` ![](https://hackmd.io/_uploads/HJ6Qoq4Sh.png) 因為 ```img src``` 是以 ```"```作結尾的,所以塞入 ```" onload="alert(1)``` 來跳脫,順便用 ```onload``` 來呼叫 ```alert``` ![](https://hackmd.io/_uploads/B11y6qVH3.png) 成功呼叫 alert ![](https://hackmd.io/_uploads/Skm7694rh.png) successful ![](https://hackmd.io/_uploads/SkkE654Bn.png) ### Lab: DOM XSS in innerHTML sink using source location.search --2023/05/22 這個實驗室中的漏洞存在於搜索博客功能中,是一個基於DOM的跨站腳本攻擊漏洞。它使用了innerHTML賦值,通過使用來自location.search的數據來更改一個div元素的HTML內容。 要解決這個實驗室,需要執行一個跨站腳本攻擊,調用alert函數。 <p class="text-right"> --by ChatGPT </p> ![](https://hackmd.io/_uploads/rJJFuSdB3.png) 打開開發人員工具,找到這一段程式碼,可以嘗試塞入 script 來觀察一下有什麼變化 ![](https://hackmd.io/_uploads/S1_Aw8dH3.png) 塞入 ```<script>alert(1)</script>``` 後,沒有執行 script 也沒有任何改變,畢竟在 span 底下 ![](https://hackmd.io/_uploads/rJ3SOLdr3.png) 塞入 ```<img src=0 onerror=alert(1)>``` 後,成功跳出 alert 視窗 ![](https://hackmd.io/_uploads/r1pDK8uB2.png) 可以看到 search results 後面有一個 broken img ![](https://hackmd.io/_uploads/rkBIYIuBh.png) 看一下程式碼的部分,因為 ```img src="0"``` 是錯誤的,所以執行後面 ```onerror=alert(1)``` 的部分,就跳出 alert 視窗啦,有點 DOM HTML 結構的落點的感覺,看來要學學前端網頁架構啦XD ![](https://hackmd.io/_uploads/rJJCK8_Hh.png) successful ![](https://hackmd.io/_uploads/Sy3fjI_rh.png) ### Lab: DOM XSS in jQuery anchor href attribute sink using location.search source --2023/05/22 這個實驗室中存在一個基於 DOM 的跨站腳本攻擊漏洞,位於提交反饋頁面。它使用 jQuery 庫的```$```選擇器函數來查找錨點元素,並使用從 location.search 中獲取的數據更改其href屬性。 要解決這個實驗室,讓「返回」鏈接彈出 document.cookie。 <p class="text-right"> --by ChatGPT </p> ![](https://hackmd.io/_uploads/Bkl086Odrh.png) 根據題目要對 ```<a id="backLink" href="/">Back</a>``` 這一行進行攻擊,所以嘗試將 href 後面的 ```/``` 改掉試試看 ![](https://hackmd.io/_uploads/rkBAXFur2.png) 在 URL 上將 ```/``` 改成 ```OVO```,可以看到 href 被改掉了 ![](https://hackmd.io/_uploads/S1rPEKOSn.png) 所以在 URL 換成 ```javascript:alert(document.cookie)```,呃,只是直接無法連線...... ![](https://hackmd.io/_uploads/HJCe8tuH3.png) 之後再來看甚麼狀況,好像被我玩壞了QQ,但顯示是 Solved ![](https://hackmd.io/_uploads/rJztLY_H2.png) ### Lab: DOM XSS in jQuery selector sink using a hashchange event --2023/05/22 這個實驗室在主頁上存在一個基於DOM的跨站腳本攻擊漏洞。它使用了jQuery的```$()```選擇器函數來自動滾動到一個給定的文章,其中標題是通過location.hash屬性傳遞的。 要解決這個實驗室的問題,你需要向受害者傳遞一個利用程式,該程式在他們的瀏覽器中調用 ```print()``` 函數。 <p class="contex-right"> --by ChatGPT </p> ![](https://hackmd.io/_uploads/rkvYOF_rh.png) ### Lab: DOM XSS in jQuery selector sink using a hashchange event --2023/05/25 這個實驗室在主頁上存在一個基於DOM的跨站腳本攻擊漏洞。它使用了jQuery的```$()```選擇器函數來自動滾動到一個給定的文章,其中標題是通過location.hash屬性傳遞的。 要解決這個實驗室的問題,你需要向受害者傳遞一個利用程式,在他們的瀏覽器中調用 ```print()``` 函數。 <p class="context-right"> --by ChatGPT </p> ![](https://hackmd.io/_uploads/HJiJfsdH2.png) 在 F12 找到了關於 location.hash 的程式 ![](https://hackmd.io/_uploads/SJbcfs_H2.png) 測試一下找到程式的內容,簡單來說在 URL 後面加上 ```#123```,就能將它塞入 location.hash 之中 ![](https://hackmd.io/_uploads/H18lvouSn.png) 題目給的程式,將它貼在 exploit 的 Body 中 ``` <iframe src="https://YOUR-LAB-ID.web-security-academy.net/#" onload="this.src+='<img src=x onerror=print()>'"></iframe> ``` 按下 "View exploit" 顯示,最後點擊 "Deliver exploit to victim" ![](https://hackmd.io/_uploads/Bys9G8nr2.png) successful ![](https://hackmd.io/_uploads/H16tGLhBn.png) ## PRACTITIONER ### Lab: Reflected XSS into a JavaScript string with angle brackets and double quotes HTML-encoded and single quotes escaped --2023/05/17 此實驗室中的問題是在搜尋查詢追蹤功能中存在一個反射型跨網站指令碼 (XSS) 漏洞,其中角括號和雙引號被 HTML 編碼,單引號被逃脫。 要解決這個實驗室,需要執行一個跨網站指令碼攻擊,打破 JavaScript 字串並呼叫 alert 函數。 <p class="text-right"> --by ChatGPT </p> ![](https://hackmd.io/_uploads/ByZU1pWHn.png) 所以先確認 ```\``` 有幾個,看來藏了一個 ![](https://hackmd.io/_uploads/SyyLSaZS3.png) 所以要多塞入一個 ```\``` ![](https://hackmd.io/_uploads/SJowyTbBn.png) 塞入 ```OVO\';alert(1)//``` ![](https://hackmd.io/_uploads/HyM5BT-Hn.png) 跳出 alert 視窗啦 ![](https://hackmd.io/_uploads/BkLABpZr2.png) successful ![](https://hackmd.io/_uploads/H1hJIpWSh.png) ### Lab: Stored XSS into onclick event with angle brackets and double quotes HTML-encoded and single quotes and backslash escaped --2023/05/17 這個實驗室的漏洞是在評論功能中的存儲型跨站腳本漏洞。 要解決這個實驗室,您需要提交一個評論,當點擊評論作者名稱時調用alert函數。 <p class="text-right"> --by ChatGPT </p> ![](https://hackmd.io/_uploads/ryXev6bS3.png) 看來看去可以攻擊的地方應該是 website 這一欄,開發人員工具裡會確認 http 還是 https,所以記得加上,然後塞入 ```&apos;-alert(1)-&apos;``` 額外說明 : ```&apos;``` 就是```'``` 為什麼不用 ```'``` 這個,因為右邊的那個會被解析為字符,所以 encode 成 ```&apos;``` ![](https://hackmd.io/_uploads/BJJhd6WH3.png) 點擊剛剛你留言的名字,跳出 alert 視窗 ![](https://hackmd.io/_uploads/rygRY6Wrn.png) successful ![](https://hackmd.io/_uploads/Skt8d6ZBh.png) ### Lab: Reflected XSS into a template literal with angle brackets, single, double quotes, backslash and backticks Unicode-escaped --2023/05/17 這個實驗室中的搜索博客功能存在反射型跨站腳本漏洞。反射發生在一個範本字串中,其中角括號、單引號和雙引號被 HTML 編碼,反引號則被轉義。要解決這個實驗室,執行一個在範本字串內呼叫 alert 函數的跨站腳本攻擊。 <p class="text-right"> --by ChatGPT </p> ![](https://hackmd.io/_uploads/SJ4jUkMHn.png) 從 ```document.getElementById('searchMessage').innerText = message;``` 這一行中,可以看出只要在 search 裡面使用 ```${}``` 語法就能塞入我們想讓它執行的程式 ![](https://hackmd.io/_uploads/HJN9wJGS2.png) 所以塞入 ```${alert(1)}``` 就能達成需求啦 OUO ![](https://hackmd.io/_uploads/ryokt1Mr2.png) 跳出 alert 視窗啦 ![](https://hackmd.io/_uploads/BkgVKkzBh.png) successful ![](https://hackmd.io/_uploads/HJarFkMS3.png) ### Lab: DOM XSS in document.write sink using source location.search inside a select element --2023/05/22 這個實驗室中的漏洞存在於股票查詢功能中,是一個基於DOM的跨站腳本攻擊漏洞。該漏洞使用了JavaScript的document.write函數,該函數將數據寫入頁面。document.write函數使用了來自location.search的數據,您可以通過網站URL來控制這些數據。這些數據被包裹在一個select元素中。 要解決這個實驗室,需要執行一個跨站腳本攻擊,打破select元素的限制並調用alert函數。 <p class="text-right"> --by ChatGPT </p> ![](https://hackmd.io/_uploads/BJGDXjVrh.png) 從程式碼中可以看出 storeId 是可以修改的關鍵 ![](https://hackmd.io/_uploads/rJXXRL_S2.png) 所以在 URL 的部分塞入 storeId 任何字串,來創造一個新的 select ![](https://hackmd.io/_uploads/By1LNPdHh.png) 在 ```document.write('<select name="storeId">');``` 中,可以看出應該先塞入 ```">```,後面就可以加入 alert 來達成目的。 然而沒有成功,所以看一下程式碼,emmm......新增的 select 多了一個 ```selected```,所以可能需要加上 ```</select>``` ![](https://hackmd.io/_uploads/SkNUUDOrh.png) 可以看到多加上 ```</select>``` 就可以了 ![](https://hackmd.io/_uploads/ryI1vwuSn.png) successful ![](https://hackmd.io/_uploads/rkW7wwOH2.png) ### ### Lab: Exploiting cross-site scripting to steal cookies --unfinished, it is too hard QQ ![](https://hackmd.io/_uploads/Sk1W2PgSn.png)

    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