TwentySeV
    • 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 No publishing access yet

      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.

      Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Explore these features while you wait
      Complete general settings
      Bookmark and like published notes
      Write a few more notes
      Complete general settings
      Write a few more notes
      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 No publishing access yet

    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.

    Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Explore these features while you wait
    Complete general settings
    Bookmark and like published notes
    Write a few more notes
    Complete general settings
    Write a few more notes
    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
    <h1> MS17-010 </h1> <h2> Table of Contents: Điểm điểm, thông số kỹ thuật của lỗ hổng MS17-010 Điều kiện khai thác được lỗ hổng MS17-010 vào máy tính nạn nhân Demo Cách thức phòng chống, nhận biết hành vi tấn công khai thác lỗ hổng. </h2> # Điểm điểm, thông số kỹ thuật của lỗ hổng MS17-010 - Tên mã: MS17-010 hay còn được gọi là EternalBlue là một lỗ hổng phần mềm trong hệ điều hành Windows của MiAcrosoft. Nó nhắm vào giao thức Windows Server Message Block (SMB), một giao thức mạng cho phép chia sẻ quyền truy cập vào các tệp, máy in và các tài nguyên khác trong mạng. - Dịch vụ bị ảnh hưởng: SMBv1 (Server Message Block version 1) - MS17-010 là lỗi "buffer overflow" (tràn bộ nhớ đệm), trong đó kẻ tấn công có thể gửi nhiều dữ liệu hơn khả năng chứa của bộ nhớ đệm SMB. Điều này làm cho các phần mã không mong muốn chạy trong bộ nhớ, giúp kẻ tấn công đưa payload vào và thực thi. - Lỗ hổng của nó được công khai qua CVE-2017-0143 đến CVE-2017-0148 là một nhóm lỗ hổng nghiêm trọng trong máy chủ Microsoft SMBv1 được sử dụng trong Windows 7, Windows Server 2008, Windows XP và thậm chí cả Windows 10 chạy trên cổng 445 - Mức độ nghiêm trọng: Rất cao - Lỗ hổng này không chỉ áp dụng cho Microsoft Windows; trên thực tế, bất kỳ thứ gì sử dụng giao thức máy chủ Microsoft SMBv1, chẳng hạn như máy in, thiết bị y tế siêu âm đều có khả năng bị tấn công. - Đã sử dụng như là một phần của Vụ tấn công WannaCry. WannaCry (cũng có tên là Wanna Decrypt0r hay WannaCrypt) là cách gọi chơi chữ của kẻ tấn công, ngụ ý rằng ai bị “dính” nó thì chỉ có nước khóc. Về mặt kỹ thuật, ransomware WannaCry khi lây nhiễm được vào máy tính sẽ mã hóa tất cả các tập tin dữ liệu trên ổ cứng bằng thuật toán mã hóa AES và RSA, nghĩa là hacker có thể giải mã trực tiếp các file bị khóa bằng một khóa giải mã duy nhất. - Mặc dù lỗ hổng đã được vá vào năm 2017, các cuộc tấn công EternalBlue vẫn diễn ra thường xuyên. Công ty bảo mật Avast ước tính rằng mỗi tháng họ chặn khoảng 20 triệu lần khai thác EternalBlue. ![image](https://hackmd.io/_uploads/S1aYRh6g1l.png) # Điều kiện khai thác được lỗ hổng MS17-010 vào máy tính nạn nhân - Dò quét cổng TCP/445 trên toàn mạng và tìm cách khai thác lỗ hổng MS17-010 và lây nhiễm qua các máy khác - Các lỗ hổng tồn tại bởi vì máy chủ SMBv1 trong các phiên bản khác nhau của Microsoft Windows chấp nhận các gói dữ liệu đặc biệt được tạo bởi những kẻ tấn công từ xa - Bản chất của SMB cho phép di chuyển ngang trong mạng. Nó cho phép kẻ tấn công phát tán phần mềm độc hại từ hệ thống này sang hệ thống khác. Điều đó có nghĩa là một khi đã vào bên trong, phần mềm độc hại có thể di chuyển qua toàn bộ mạng nếu không được phân đoạn đúng cách. # Demo Đầu tiên ta phải nhận biết được server của Microsoft đang chay thông qua 3 port điển hình là 135, 139, 445 ![image](https://hackmd.io/_uploads/SkIZo6pgye.png) Ta có 3 cách để phát hiện rằng lỗ hổng MS170-010. Đầu tiên là sử dụng kỹ năng search. Sau khi biết được version của máy chủ là gì ta sẽ xem ở version đó nó có lỗ hổng nào có sẵn không ![image](https://hackmd.io/_uploads/Sksu6ppxJl.png) ![image](https://hackmd.io/_uploads/SyrG9VWbye.png) Cách thứ 2 chính là sử dụng các script có sẵn của nmap để scan lỗ hổng đó bằng option `--script vuln` ![image](https://hackmd.io/_uploads/rkZ4Appe1l.png) Cách cuối cùng đó chính là dùng metasploit, nó có 1 option hỗ trợ scan lỗ hổng ![image](https://hackmd.io/_uploads/B1RqKaplyl.png) Sau khi xác định được chính xác nó là lỗ hổng rồi, ta sẽ tiếp tục dùng metasploit để tiến hành khai thác lỗ hổng này ![image](https://hackmd.io/_uploads/HJX0YpTeJx.png) Trình meterpreter xuất hiện sau khi thực hiện khai thác để chứng tỏ khai thác thành công, đồng thời, ta sẽ gọi được shell ![image](https://hackmd.io/_uploads/rySBJA6x1e.png) Với lệnh xác định được người dùng hiện tại của mình là `nt authority system` là quyền cao nhất. Ta có thể thao tác bất cứ thứ gì mình muốn mà không cần phải leo quyền nữa. Dưới đây là một vài thao tác. Đọc file config ![image](https://hackmd.io/_uploads/SkuBQC6eke.png) Dump password ![image](https://hackmd.io/_uploads/S1B-EATxJl.png) ![image](https://hackmd.io/_uploads/HJJA4AaeJx.png) # Cách thức phòng chống, nhận biết hành vi tấn công khai thác lỗ hổng. ## Nhận biết hành vi tấn công - Giám sát lưu lượng SMB bất thường: Lỗ hổng MS17-010 thường kèm theo các yêu cầu SMB bất thường. SOC có thể dùng các công cụ như IDS/IPS (Intrusion Detection/Prevention Systems) để phát hiện lưu lượng SMB khả nghi, đặc biệt là các yêu cầu mã hóa (suspicious encrypted requests). - Các event id 4688 (Creation process) sẽ xuất hiện ## Cách thức phòng chống - Khai thác lỗ hổng MS17-010 cần truy cập vào cổng 445, nơi dịch vụ SMB hoạt động. Nếu cổng này bị chặn từ bên ngoài (bởi tường lửa hoặc chính sách mạng), kẻ tấn công sẽ khó có thể tiếp cận để khai thác. - Vô hiệu hóa SMBv1: Nếu không cần SMBv1, việc vô hiệu hóa nó có thể bảo vệ hệ thống của bạn. - Sao lưu giữ liệu an toàn thường xuyên và có phiên bản để riêng trên thiết bị lưu trữ không nối mạng. Với lưu trữ đám mây hãy chắc chắn lấy được dữ liệu sạch từ phiên bản cũ hơn nếu chẳng may các file trên mây bị dịch vụ đồng bộ tập tin ghi đè file mã hóa từ ổ cứng. - Vá hệ thống của bạn: Áp dụng bản vá MS17–010 của Microsoft để vá lỗ hổng bảo mật. # Reference https://www.sentinelone.com/blog/eternalblue-nsa-developed-exploit-just-wont-die/

    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
    Sign in via Google Sign in via Facebook Sign in via X(Twitter) Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    By signing in, you agree to our terms of service.

    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