Hello World Dev Conference
      • 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
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners 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
    • 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 Help
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
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Write
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners 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
    2
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    # 國家級駭客攻防戰:從血淚教訓到 DevSecOps 實踐 - 廖長健 {%hackmd @HWDC/BJOE4qInR %} >#### 》[議程介紹](https://hwdc.ithome.com.tw/2024/session-page/3308) >#### 》[填寫議程滿意度問卷|回饋建言給辛苦的講者](https://forms.gle/QbgEztWrKNbdS5PE6) 不會講功法、不會講手法,會講 lesson learn 與後續精進作為 分為5個session # Session 1 外面的世界很恐怖(! * 不流血的戰爭 * 血淚教訓分享 * 安全開發流程 * 主動監控機制 * 擁抱DevSecOps 首先,天天在打仗!!!戰況激烈 ## 2024 CVE數量,出現驚人成長 * CVE reprots(資安通報) increasing a lot ## 累積CVE數量(Microsoft: 11, 779) * 國家級駭客(伊朗、北韓、中國、俄羅斯...) * Microsoft即便很棒但去年也有100多個CVE * Google沒有CVE是因為沒有自建產品,但是也是有漏洞 * Google也有面臨駭客威脅,不是百毒不侵 * 敵人看不見、不睡覺、一直想攻擊你 ## 累積CVE數量(Openfind: 15) * 截至目前為止只有2個,主動發出去的資安通報有9個 * 有能力的廠商會主動發現弱點並補強 * 勇於即時公布這是負責任的態度 * 反觀國內外小廠商,沒有能力發布CVE,不知不覺狀況外 * 台灣的企業要700多天才知道自己被入侵 * 原廠願意發CVE要正面看待 ## 全球郵件廠商無一倖免(2023下半年至今) * 攻擊郵件是駭客的高度優先 * 社交工程透過信件去騙 * 攻郵件系統還是大家得共識 ## 這是一場不對稱的戰爭:民力 vs 正規軍隊 * 國家級駭客從軍隊轉為民營化經營 `7*24` 輪班攻擊,發放激勵獎金 * 對方是幾千人,我們是幾十人 * 有些方法要調整 * 資安意識提升 * 鼓勵勇於解決而不是蓋下來,然後要通報 # 含淚分享的第一手作戰經驗 ## 供應鏈攻擊的演進與挑戰 - 舉例:攻擊目標為大金控 - 要攻進去不容易,也許他們的供應商做得不好 - 但是供應商可能是弱點 - 攻擊第三方元件 - 因此除了自己要做好,利害關係人也要防得好 - 攻擊是非常多面向的 ## 2024年至今Openfind CVE統計分析 * 60 % 為 XSS 或安全設定未周全相對低風險漏洞 * 40 % 為高風險 * 很多是自己發現,自己對外做更新 * 只有20%針對Openfind ## 為什麼攻擊者對系統這麼熟悉? * 我們的source code沒有證據有被偷,而駭客想成功攻擊不需要這麼麻煩 * 只要有做地端生意,要取得你的程式不難,很難100%杜絕 * 可以冒名申請測試版 * 只要開門做生意,只要是商用軟體要拿到測試軟體不是不可能 * 有測試環境就可以作很多事,用手冊就可以進console ## 1. 取得測試環境,即可查看Unrar版本 * 針對CVE-2022-30333弱點設計的壓縮檔 * 只要沒更新 RAR ,拿到這個 RAR 就中招 ## 2. 接獲Google情資,提供逆向工程分析 * Google Lab 寄給Openfind的信件當中有逆向工程的原始碼 ## 3. 駭客在測試環境,可用strace逐步分析 * 使用System Call Tracing 可以得知程式的I/O行為 * 身為現代的程式開發人員不要以為對方有source code才能攻擊 ## 疑問二: 為什麼擋不住攻擊者的攻擊? * 專門且針對 * 國家級駭客的手法 * 組合多種輕微弱點 * 只要夠重要,就會有人做工具組合販賣,傻瓜也能攻擊 * 在暗網會被懸賞,會被自動化工具攻擊## * SOP 都建立好了 ## 1. 在自建環境可以慢慢測試針對性攻擊 * Javascript裡面的Script清了32層,因為太多層效率會很差 * 駭客有時間慢慢try ## 2. 堪稱藝術的組合式手法 * 其實每個弱點都不算大,但是加起來確會有殺傷力 * 真的在寫程式的時候不能假設所有東西都是乾淨的 ## 3. 當你(或客戶)很重要,有需求就會有供給 * 國家級駭客會願意花重本不計代價研究我們,是因為我們值得 * 這些弱點只會用在關鍵的時機 # 安全軟體開發生命週期 SSDLC ## 產品研發常見的三大資安挑戰 * 不是你自己寫的 Legacy Code * 第三方元件大家忘記更新,舊的元件就可能被利用,甚至自動化攻擊的library都有 * 新進人員訓練不足、經驗不足 ## 防禦方的基本假設 * 有賣地端的產品: 攻擊者已有產品完整實驗環境 * 被冒名取得,在封閉網路去測試 * 可輕易的找到攻擊目標伺服器:客戶 * 攻擊者已有目標環境使用者帳號 * 不要用弱密碼 * 在機場沒有用 VPN 偷到你的密碼 (撞庫攻擊) ## 落實 SSDLC 安全軟體發展生命週期 * (以 Openfind 的安全軟體系統開發管理程序為例) ## 強化 Peer Review、原碼掃描、弱點檢測 * 每天 commit source code 前需由資深同仁 Peer review ## 落實第三方元件管理,導入SBOM * 幫所有用戶親自更新,整理所有的第三方元件 * 盤點第三方元件的自動化管理工具 ## 留下足跡為鑑識之本 * HTTP request trace log * 留 log 且要拋到另外一台並且不要留明碼機密的東西 ## `Tips for Secure Development` * 盡量開啟 compiler 的 run-time 保護機制 (GCC hardening) * 有助於資安鑑識的 logs,尤其是 user input/output * 統一包裝關鍵的 syscall,做最底層的把關 * 對 executable binary 做簽章,驗證後才允許執行 * 導入 binary obfuscation 機制,提高 reverse-engineering 門檻 * 開發環境的基礎建設: VLAN 切割、MFA、定時斷線、登入紀錄 * 建立第三方元件的 SBOM 以進行風險管理 # Session 2 主動監聽 ## 要監控什麼? 先從知道後門埋在哪裡開始 * 要假設他最終還是有辦法摸進來,且他不會只是拿些資料就走,一定會留下後門方便他之後再回來 ## 1. 掛上惡意的Apache Moudle * 要控制Apache只能run某些module ## 2. 在Web應用程式目錄下放Web Shell * 很容易預防,只要針對此目錄做異動偵測或防寫即可 ## 3. 偷偷置換作業系統的函式庫 * 可以換掉glibc library * 一開始沒想到,從任何地方都找不到 * 從那次開始監控所有lib的版本跟md5 ## 4. 巧妙掛上kernel rootkit 變身隱形人 * 無法用ls、ps看到惡意程式 ## 從PaaS到SaaS的7*24資安監控 ## 資安偵測機制,猶如打開潘朵拉盒子 * 一天到晚都被攻進來,而且他都摸得進來 ## 培養團隊... ## Openfind視角的DevSecOps * DevSecOps = SSDLC+OP ## AWS推薦的DevSecOps實務5要點 * 程式碼分析 * 變更管理 * 合規管理 * 威脅模型 * 資安教育訓練 ## 如何順利轉型至DevSecOps 1. 資安意識與文化: 每個月分享新手法 2. 左移: 在開發階段加入安全需求 3. 右移: 上線之後持續監控與更新 4. 自動化: 要盡量自動化 ## `Tips for Secure Operation` * 從 kernel level 監控關鍵 system call 並導入 AI 分析技術 * 建置 log server 來外拋 (入侵後高機率會被清掉) * 重要目錄進行防寫鎖定、資料目錄 mount noexec * 切割維運用與辦公用的設備及網路 * 加強型 MFA (knock-OTP) * 要有辦法對整個系統建立 digest checking ## 結論 * 上有牌子的雲端是開發者與企業IT最好的救贖 (比較不用擔心被攻的問題因為有人會幫忙守) == 以下是聊天區 == 居然是執行長來講 網擎我只知道他們以前作Openfind,現在主要業務是什麼? > 應該還是郵件吧 >> 這場我還以為他們開始做資安了 > ^^ 我們只做郵件不夠養員工哦~ 郵件資安2004年就開始做了,2019年有推出相關的雲端服務可以保護其它的雲信箱。目前則是大部分工作跟郵件相關的資安有關 剛把 tips 放上來了,那兩頁覺得比較精華想分享 ^^

    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