Orange Tsai
    • 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 New
    • Engagement control
    • Make a copy
    • 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 Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy 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
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Web Security 輕鬆談 12/28 === > 共筆網址: https://tinyurl.com/websec1228 > 回饋問卷: https://forms.gle/BjLmQMMh4TJfVgDQ6 > *從外縣市來的同學辛苦了xD [name=Orange Tsai]* --- # 今日 Lab > `http://52.194.254.72/` > 打掉它! Hint: `/admin` > > *在下課前打掉它的,我會跟你說「**你好棒**」XD [name=Orange Tsai]* ### 解答 :::spoiler 點我看解答XD 1. 如何觀察出架構? - Varnish -> Nginx -> Apache 2. 找出攻擊在哪一層被阻擋? - Varnish 那層 3. 阻擋了什麼? - `%AD` 4. 從 Nginx 版本可以發現 [CVE-2019-20372](https://github.com/vuongnv3389-sec/CVE-2019-20372) - 熟悉一下如何使用 Burp Suite 確認 Request Smuggling 存在! - 可以到 [來不及補充的額外補充區](#來不及補充的額外補充區) 小看一下漏洞成因 5. 透過 Request Smuggling 繞過阻擋戳 PHP-CGI RCE - [CVE-2024-4577](https://github.com/php/php-src/security/advisories/GHSA-3qgc-jrrr-25jv) ![image](https://hackmd.io/_uploads/HJCS68pBJl.png) ![image](https://hackmd.io/_uploads/BJMf6IaSkl.png) ::: --- # 雜亂留言區 *我們抓個 `13:10` 開始,聊到什麼講什麼XD* > 可以從熟悉的程式語言開始蒐集 Bug Type *P.S. 建議從 PHP/Java 開始,因為擁有廣泛的生態系以及最多的 Bug Type* 測試留言,耶 --- # 暖身區 ## 🙋 (開放回答) PHP 歷史上有哪些經典的 RCE? * PHP-CGI 1. [Eindbazen PHP-CGI advisory (CVE-2012-1823)](https://web.archive.org/web/20130312133212/http://eindbazen.net/2012/05/php-cgi-advisory-cve-2012-1823/) * 從 CTF 中被發現的洞XD * 可以看 phith0n 的[中文解釋](https://github.com/vulhub/vulhub/blob/master/php/CVE-2012-1823/README.md) * 新聞不 EY XD * [Facebook Partially "Vulnerable" to PHP-CGI Bug, Security Expert Finds](https://news.softpedia.com/news/Facebook-Partially-Vulnerable-to-PHP-CGI-Bug-Security-Expert-Finds-267689.shtml) 2. [PHP RCE: A Bypass of CVE-2012-1823, Argument Injection in PHP-CGI](https://github.com/php/php-src/security/advisories/GHSA-3qgc-jrrr-25jv) * 透過 Best-Fit 特性繞過,詳情可參考 [WorstFit Attack](https://worst.fit/) 的投影片,或是等 [DEVCORE CONF 2025](https://conf.devco.re/2025/agenda/) 會有中文首發XD * PHP-FPM 設定錯誤系列 * 服務直接對外開放可直接執行程式碼 (Port 9000) * 或透過 SSRF 戳 -> `gopher://127.0.0.1:9000/_%AA%BB%CC` * [Fastcgi协议分析 && PHP-FPM未授权访问漏洞 && Exp编写 | 离别歌](https://www.leavesongs.com/PENETRATION/fastcgi-and-php-fpm.html) * Zerodium 後門事件 * [The commits say it was 'sold to zerodium, mid 2017', which would lead me to beli...](https://news.ycombinator.com/item?id=26621276) * CVE-2019-11043 - PHP-FPM `PATH_INFO` underflow leads to RCE * 印象中也是在玩 CTF 中發現的洞,可看這篇分析XD * [An analysis and thought about recently PHP-FPM RCE (CVE-2019-11043) | Orange Tsai](https://blog.orange.tw/posts/2019-10-an-analysis-and-thought-about-recently/) :::success 歡迎留言補充XD ::: ## 🙋 (開放回答) PHP 有哪些經典 Bug Type? ### ➡️ LFI > `include($USER_CONTROL_INPUT)` > `require($USER_CONTROL_INPUT)` * 利用既有的上傳檔案功能 * `access.log` 或各種 log * `/proc/self/` 系列 * `/proc/self/environ` * 舊版 Httpd 有環境變數可以直接控制內容 * `/proc/self/fd/0` * CGI 狀態下可以吃 `STDIN` * 補充 CVE-2017-17562 - GoAhead 利用 LD_PRELOAD 做後利用 * [Remote LD_PRELOAD Exploitation - GoAhead: Make My Day](https://www.elttam.com/blog/goahead/) * 利用上傳中的暫存檔 * 透過 `phpinfo()` 的條件競爭 * [LFI WITH PHPINFO() ASSISTANCE](https://insomniasec.com/downloads/publications/LFI%20With%20PHPInfo%20Assistance.pdf) **<-- 經典** * 暫存檔名稱太短可以暴力破解 * 晚點有空一起追下 Windows 怎麼生暫存檔名 * 可以送 > 65535 個嗎XD? * 不行,被 `max_file_uploads` 擋住了 (預設 20 個) * 暫存檔名稱 (說不定) 不夠亂 * 可以學習 PRNG (Pseudo Random Number Generator) 的問題,也是一個有趣的 Bug Type * Windows 的 `FindFirstFileEx` 特性可以用萬用字元 `"` `>` `<` 搭配利用 * 印象最早是在這篇 Paper 中看到的 * [Oddities of PHP file access in Windows®](http://www.madchat.fr/coding/php/secu/onsec.whitepaper-02.eng.pdf) * HITCON 2015 我也有 recap 到這個特性 * [那些 Web Hacking 中的奇技淫巧](https://github.com/orangetw/My-Presentation-Slides/blob/main/data/2015-tricks-in-web-hacking.pdf) * Windows 的短檔名特性 * 8.3 特性 * [IIS Shortname Scanner](https://github.com/irsdl/IIS-ShortName-Scanner) * `/AAA*~1.*/.aspx` * 這個作者後續還有一些用 Windows 特性去做檔案名稱洩漏的研究滿推薦閱讀的 * [Beyond Microsoft IIS Short File Name Disclosure](https://github.com/irsdl/IIS-ShortName-Scanner/blob/master/presentation/Steelcon-2023-Beyond_Microsoft_IIS_Short_File_Name_Disclosure.pdf) * [WooYun - PHPWind win服务器可被下载备份文件](https://wooyun.laolisafe.com/bug_detail.php?wybug_id=wooyun-2014-078223) * 利用 SESSION 檔案 * [HITCON CTF 2018 - One Line PHP Challenge](https://blog.orange.tw/posts/2018-10-hitcon-ctf-2018-one-line-php-challenge/) * [One Line PHP: 從入門到入土](https://hackmd.io/@ginoah/phpInclude) by @Ginoah * 把對 One Line PHP 的致敬歷史講了一遍XD * 其實這篇也總結了上面滿多的利用XD * Filter Chain * [hxp CTF 2021 - The End Of LFI?](https://web.archive.org/web/20240811030539/https://tttang.com/archive/1395/) * 用 Filter Chain 創出任意字元 * [The End of AFR?](https://web.archive.org/web/20230604095736/https://tttang.com/archive/1755/) * AFR = Arbirary File Reading * 用 Filter Chain 創出任意字元的 Oracle * Iconv RCE * CVE-2024-2961 - [iconv OOBW to RCE](https://www.ambionics.io/blog/iconv-cve-2024-2961-p1) - Overflow 1-3 bytes 後對 `zval` 搞事 ### ➡️ 反序列化 > `unserialize($USER_CONTROL_INPUT)` * 記憶體漏洞 * 最早 (aka 最被人所知) 從 Stefan Esser 開始提起 * 2009 - [State of the Art Post Exploitation in Hardened PHP Environments](https://www.blackhat.com/presentations/bh-usa-09/ESSER/BHUSA09-Esser-PostExploitationPHP-SLIDES.pdf) * 需要結合 Binary Exploitation 條件門檻較高 * 也可參考這篇實際案例XD * [A Journey Combining Web Hacking and Binary Exploitation in Real World!](https://blog.orange.tw/posts/2021-02-a-journey-combining-web-and-binary-exploitation/) * 涉及到的知識點 * PHP 弱型別比較 * PHP PRNG 預測 * PHP 中的 Use-After-Free - [CVE-2015-0237 - Use after free vulnerability in unserialize() with DateTimeZone](https://bugs.php.net/bug.php?id=68942) * 透過 Magic Method 構建 POP Chain * `__construct()` * `__destruct()` * `__toString` * `__call()` * `__wakeup()` * 拙劣的筆記:[https://wha13.github.io/2024/04/03/php-serial/](https://wha13.github.io/2024/04/03/php-serial/) [name=Whale120] * Phar Deserialization * 2017 - [Baby^H Master PHP 2017](https://github.com/orangetw/My-CTF-Web-Challenges#babyh-master-php-2017) * 2018 - [“It’s a PHP unserialization vulnerability Jim, but not as we know it”](https://i.blackhat.com/us-18/Thu-August-9/us-18-Thomas-Its-A-PHP-Unserialization-Vulnerability-Jim-But-Not-As-We-Know-It.pdf) ### ➡️ 上傳 *P.S. PHP, JSP or ASP/ASPX 獨有的 Bug Type,因為它們都是以 **檔案** 作為進入點* ### ➡️ Loose Type Comparison ### ➡️ (共同) SQL Injection ### ➡️ (共同) Command Injection * 防禦上的繞過,這兩個的差異是什麼? 用錯會產生什麼問題? * `escapeshellcmd()` * `escapeshellarg()` * > [兩個一起用的後果:Argument Injection](https://hackerqwq.github.io/2020/10/30/escapeshellarg-escapeshellcmd%E9%80%A0%E6%88%90%E5%8F%82%E6%95%B0%E6%B3%A8%E5%85%A5/) [name=Whale120] * > 本來只是想說誤用 `escapeshellcmd` 來過濾參數還是會有 Argument Injection,但你這篇更進一步是在說 `Escape 再 Escape 反而更危險XD`,我覺得當成課外補充很棒! 幫你多補充兩篇XD [name=Orange] * [PHP escapeshellarg()+escapeshellcmd() 之殇](https://paper.seebug.org/164/) * [浅谈escapeshellarg逃逸与参数注入](http://www.mi1k7ea.com/2019/07/04/%E6%B5%85%E8%B0%88escapeshellarg%E4%B8%8E%E5%8F%82%E6%95%B0%E6%B3%A8%E5%85%A5/) ### ➡️ EAR - Execution After Redirect ```php= <?php $username = $_SESSION['username']; if ($username != 'admin') { header("Location: /login"); // exit(); 沒有跳出的話,程式運行將會持續下去 } // admin logic ``` # 作業區 - `PHP-CGI` x 4 - Ref to [PHP 歷史上有哪些經典的 RCE](#🙋-開放回答-PHP-歷史上有哪些經典的-RCE) - `Log4Shell` x 3 - 反序列化歷史 - 2015 - [What Do WebLogic, WebSphere, JBoss, Jenkins, OpenNMS, and Your Application Have in Common? This Vulnerability.](https://foxglovesecurity.com/2015/11/06/what-do-weblogic-websphere-jboss-jenkins-opennms-and-your-application-have-in-common-this-vulnerability/) - 開山始祖等級XD - JNDI Injection - 2016 - [A Journey from JNDI/LDAP operation to remote code execution dream land](https://www.blackhat.com/docs/us-16/materials/us-16-Munoz-A-Journey-From-JNDI-LDAP-Manipulation-To-RCE.pdf) - `trustCodebase` - 透過 Ref 繞過 - `BeanFactory` 搭配 `ELProsseror` (or more...) - JDBC Injection - [New Exploit Technique In Java Deserialization Attack](https://i.blackhat.com/eu-19/Thursday/eu-19-Zhang-New-Exploit-Technique-In-Java-Deserialization-Attack.pdf) - `Apache Httpd` x 3 - 慢慢看文章XD - [Confusion Attacks: Exploiting Hidden Semantic Ambiguity in Apache HTTP Server!](https://blog.orange.tw/posts/2024-08-confusion-attacks-en/) - `ProxyLogon` x 1 - 慢慢看文章XD - [A New Attack Surface on MS Exchange Part 1 - ProxyLogon!](https://blog.orange.tw/posts/2021-08-proxylogon-a-new-attack-surface-on-ms-exchange-part-1/) - [A New Attack Surface on MS Exchange Part 2 - ProxyOracle!](https://blog.orange.tw/posts/2021-08-proxyoracle-a-new-attack-surface-on-ms-exchange-part-2/) - [A New Attack Surface on MS Exchange Part 3 - ProxyShell!](https://blog.orange.tw/posts/2021-08-proxyshell-a-new-attack-surface-on-ms-exchange-part-3/) - [A New Attack Surface on MS Exchange Part 4 - ProxyRelay!](https://blog.orange.tw/posts/2022-10-proxyrelay-a-new-attack-surface-on-ms-exchange-part-4/) - `Spring4Shell` - CVE-2022-22965 - Auto Binding - 額外補充 Mass Assignment Attack - [Hacked: commit to rails master on GitHub](https://news.ycombinator.com/item?id=3663197) - 繞過 CVE-2010-1622 - 歷史總是驚人的相似XD - Java 中所有物件都繼承 [Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) 這個物件 - 為什麼可以繞過? - JDK 9+ 多了 `modules` - [spring rce 从cve-2010-1622到CVE-2022-22965](https://xz.aliyun.com/t/11280) - 2010 的 POC -> `?class.classLoader.URLs[0]=xxx` - 2022 的 POC -> `?class.module.classLoader.URLs[0]=xxx` - `CVE-2022-29078` - eJS RCE - 還是要回到不好的 Coding Style 直接把 `req.query` 整個 Object 當成參數丟進去 `render(...)` - 類似案例: [Eta Remote Code Execution](https://hackmd.io/@Ching367436/SkkvuMAoi) by @Ching367436 - > https://blog.ching367436.me/ais3-2022-%E6%9C%80%E4%BD%B3%E5%B0%88%E9%A1%8C/ [name=Ching367436] - `CVE-2023-36825` - [Laravel Orchid Deserialization to RCE](https://github.com/orchidsoftware/platform/security/advisories/GHSA-ph6g-p72v-pc3p) - `_state` 參數上的裸反序列化 - .Net / Java 等網頁框架也有 View State,為什麼要有這種設計? - CVE-2010-3332 - ASP.NET Padding Oracle - **經典中的經典**,就算對 View State 加密後但加密實作 CBC 沒處理好錯誤導致可以偽造明文 - 就算很老還是很建議學習一下XD - 學完可以順便把 `基於 Machine Key 的反序列化攻擊` 技能點好XD - 對 View State 加解密的金鑰也是重點關注對象 - 能不能預測? - 是不是寫死的? - 夠不夠長? - 線上產的 Machine Key Generator 可不可以信任(? - 要把 **狀態** 變成可傳輸的字串通常會設及到 **反序列化** 操作 - `CVE-2022-46169` - `Cacti RCE` - 裸的 Command Injection,不過可以看一下[修法](https://github.com/Cacti/cacti/commit/7f0e16312dd5ce20f93744ef8b9c3b0f1ece2216) - 把抓 proxy 的行為拿掉 - `CVE-2024-23334` - aiohttp LFI - 單純忘記檢查 - 程式語言對 Path Join 的小特性 - > os.path.join("/var/www/html/uploads/", path) # 可以用絕對路徑覆蓋 - `CVE-2024-6782` - [Calibre Remote Code Execution](https://starlabs.sg/advisories/24/24-6782/) - 看起來可以 pre-auth 戳是預期行為,所以修 RCE part - `CVE-2024-2961` - [Iconv OOBW to RCE](https://www.ambionics.io/blog/iconv-cve-2024-2961-p1) - Overflow 1-3 bytes 對 `zval` 搞事 - `CVE-2023-2825` - GitLab LFI - [Gitlab CVE-2023-2825 一个罕见的目录穿越漏洞](https://rce.moe/2023/05/25/Gitlab-CVE-2023-2825/) - 一個裸的 LFI,只是要過 Nginx 的 Path Validation XD - `CVE-2023-50164` - [S2-066 - Apache Struts 2 Remote Code Execution](https://cwiki.apache.org/confluence/display/WW/S2-066) - [Apache Struts2 文件上传分析(S2-066)](https://y4tacker.github.io/2023/12/09/year/2023/12/Apache-Struts2-%E6%96%87%E4%BB%B6%E4%B8%8A%E4%BC%A0%E5%88%86%E6%9E%90-S2-066/) - 滿好玩的洞XD - 上傳時變數的命名碰撞XD - 變數名稱 = `field + "FileName"`,又放進 HttpParameters - TreeMap 會分大小寫,從 GET/POST 放個同樣名稱的變數會導致 `setter` 被呼叫兩次 - 設計一個 case 讓惡意的可以晚一點被呼叫,導致覆蓋路徑成 `../` - S2-067 繞過可以分析一下 ==TODO== - `CVE-2024-34351` - [Digging for SSRF in NextJS apps](https://www.assetnote.io/resources/research/digging-for-ssrf-in-nextjs-apps) - 在 Host Header 上裸的 SSRF - `CVE-2024-5932` - [WordPress GiveWP Deserialization to RCE](https://www.skshieldus.com/download/files/download.do?o_fname=Research%20Technique_PHP%20Object%20Injection%20Vulnerability%20in%20WordPress%20GiveWP%20(CVE-2024-5932).pdf&r_fname=20240927174114070.pdf) - PHP Object Injection 真是炫泡的用語XD - `CVE-???????` - TOTOLINK - `CVE-2024-21726` - [Joomla: PHP Bug Introduces Multiple XSS Vulnerabilities](https://www.sonarsource.com/blog/joomla-multiple-xss-vulnerabilities/) - 利用 `mb_strpos` & `mb_substr` 對 UTF-8 長度理解的不一致導致繞過 sanitizer - UTF-8 Leading Byte - 怎麼修的? - Joomla 直接改回 `strpos` & `substr` - [PHP Bug](https://github.com/php/php-src/pull/12913) - 同樣的原理可以移植到不同應用上造成新的漏洞 - 例如 Apache Guacamole 上有使用 Java 撰寫的部分也有使用 C 撰寫的部分,兩個對 UTF-8 字串的解析不一致也會造成問題 - [The Hazards of Technological Variety and Parallelism: An Avocado Nightmare](https://www.sonarsource.com/blog/avocado-nightmare-1/) - `CVE-2021-22204` - Djvu RCE - `CVE-2024-23897` - Jenkins arg4j 任意讀檔 # 來不及補充的額外補充區 * Request Smuggling * 文章: * [HTTP Desync Attacks: Request Smuggling Reborn | PortSwigger Research](https://portswigger.net/research/http-desync-attacks-request-smuggling-reborn) * 類別: * `TC.CL` * `CL.TC` * `CL.0` * [CVE-2019-20372](https://github.com/vuongnv3389-sec/CVE-2019-20372) - Request Smuggling on Nginx `error_page` directive * Nginx 在處理特定狀況時 (`error_page` redirect + early return) 未將連線關閉,導致 Buffer 內的 POST 資料被當成第二個請求送出 * [修復](https://github.com/nginx/nginx/commit/c1be55f97211d38b69ac0c2027e6812ab8b1b94e)就是把記得把資料丟掉XD * Side Channel Attack * 什麼是 Oracle * 好玩的小故事 on `/server-status/` * IDNA 標準很容易出問題 * `idn_to_ascii()` * EAR 測測看 Golang * [EAR on Golang](https://hackmd.io/@Jimmy01240397/BypPswaSkl) by @Jimmy01240397

    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