XeusNguyen
    • 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
    • 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
    • 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 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
  • 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
    1
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    # Robust Scanner - Vulnerable Scanning (PBL - 9/2022) ###### tags: `research` `tutorials` `top10owasp` `pbl` `coding` # Tiếng việt ## Giới thiệu và trình bày phương thức - Bài toán đặt ra: Tìm hiểu AWS Cloud, xây dựng chương trình phân tích và giám sát các điểm yếu bảo mật từ bên ngoài. - Tìm hiểu về hệ điều hành Linux: Chọn môi trường Linux là ubuntu làm môi trường VPS để host website ![](https://i.imgur.com/4cupeWJ.png) - Tìm hiều về môi trường AWS ==> Nhóm đã thực hiện xây dựng một website cụ thể là **Juice-Shop OWASP TOP 10**, một web site lớn để học tập về pentest ![](https://i.imgur.com/oydNJUP.jpg) - Với VPC: sử dụng VPC và network mặc định của hệ thống AWS đã cấp - Các rule và cổng được mở cho hệ thống được bao gồm trong security group và routing table với việc mở **all-range 0.0.0.0/0** cho tất cả các lưu lượng truy cập từ bên ngoài vào hệ thống thông qua cổng 80 và config các ip cụ thể để truy cập SSH qua port 22 từ bên ngoài vào trong - **Chưa áp dụng loadblancer: Vì hosting chỉ thực hiện trên 1 EC2 nên chưa nhất thiết phải áp dụng loadblancer.** - Thực hiện build dự án bằng **Docker** ==> Container đã tồn tài sẵn vể juice-shop và opensource để thực hiện triển khai hệ thống cho sẵn. [Link Docker-Image](https://hub.docker.com/r/bkimminich/juice-shop) ![](https://i.imgur.com/4rcvdoA.png) - Về việc tìm hiểu Discord và telegram: Đây là 2 nền tảng rất phổ biến - Ở đây nhóm dự định xây dựng một bot để xử lí nhận thông báo hoặc tấn công dò lỗ hổng thông qua một API server được xây dựng - Sẽ được trình bày kĩ ở phía dưới - Về việc tìm hiểu TOP 10 owasp: Đây là một chuẩn bảo mật được trình bày phổ biến và đây là quy chuẩn để thực hiện pentest được tổ chức owasp công bố hằng năm - Để áp dụng được việc dò tìm và tấn công owasp nhóm sử dụng ZAP (Zed Attack Proxy), một công cụ pentest rất nổi tiếng và cung cấp bởi OWASP - Phù hợp để xây dựng một công cụ pentester với các AddOn mở rộng và cập nhật thường xuyên - Việc áp dụng ZAP sẽ thuận lợi cho việc xây dựng một chuỗi các tiến trình để pentest một web bao gồm các công tác recon, exploit, report và suggest ==> Thuận lợi để xây dựng một ứng dụng trực quan với addon sẽ được dựng sẵn. - Và muốn hiểu qua nhiều hơn ta nên dùng phương thức manual trên cơ sở tool như dựng context phù hợp như các authen để đăng nhập hay là các hình thức tấn công mới như 403bypass,... ![](https://i.imgur.com/WRcLh0R.jpg) - Một số nghiên cứu về OWASP và các LAB basic OWASP trên TryHackMe: 1. [Research OWASP Top 10](https://hackmd.io/@XeusNguyen/By700eFks) 2. [JuiceShop-TryhackmeLAB](https://hackmd.io/@XeusNguyen/HJAecr7xs) 3. [Research SQLi-Portswigger](https://hackmd.io/@XeusNguyen/SyHN3vdlj) 4. [Practical SQLi-Portswigger](https://hackmd.io/@XeusNguyen/SJb_GMnxj) 5. [Practical BlindSQLi-Portswigger](https://hackmd.io/@XeusNguyen/S1dDCM1bi) 6. [Practical XSS-Portswigger](https://hackmd.io/@XeusNguyen/HJkDOHr-i) ## Mô hình ứng dụng dùng để pentest một web cụ thể thông qua việc xây dựng đồ án - Hệ thống sẽ bao gồm 3 phần: - Một bot để thông báo cho người dùng thông qua nền tảng ứng dụng discord - Người dùng chỉ cần tương tác với bot để thực hiện việc tấn công và nhận thống báo kiểm thử web - Web API (Flask or Fast API) để xây dựng việc tương tác với bot ta sử dụng REST API để tạo nên các hệ thống truy vấn cho nó và nhận về và xử lí dữ liệu json ở cả 2 chiều. - Server thực hiện các vấn đề thực hiện kiểm thử như port scanner sử dụng các phương thức TCP/IP để xác nhận, technical scanner sử dụng API từ wallpalyzer và vul scanner dùng ZAP - Sơ đồ triển khai: [Link sơ đồ triển khai](https://drive.google.com/file/d/1Ammna-hfzIx1T9X-L6em_FZhrC0aWcJp/view?usp=sharing) ![](https://i.imgur.com/khtTlxp.png) - Mô tả: 1. Hoạt động sẽ tương tác thông qua bot được xây dựng trên discord. 2. Bot sẽ thực hiện các công việc sử dụng cái API đã được bố trí thông qua câu lệnh đổ về Web API xử lí. 3. Công việc hoàn thành trả về kết quả dưới dạng file json và các report nếu cần thiết - Yêu cầu: 1. Thiết lập ZAP cần một Proxy => sử dụng luôn Localhost(127.0.0.1:8080) 2. Cần phải xây dựng một context hợp lý cho ZAP (Ban đầu là những payload vô cùng basic khá khó để pentest cụ thể - Không thể làm cụ thể hơn bằng tay) + sử dụng các Addons hợp lý để phát hiện lỗ hỗng và báo report 3. ... ## Tiến độ công việc và báo cáo - Đối với Task AWS: (Tương đối cơ bản - Để tiết kiệm thì EC2 Instance Replace liên tục) (XeusNguyen - Đức) - [x] Đã thiết lập EC2 chạy Ubuntu và Assign Noip2 để tiện sử dụng thông qua DDNS (#Phù hợp với automatic assign IP mỗi lần run Instance) - [x] Image có sẵn JuiceShop nên ==> Install Docker và build Image để có container ==> Docker run NAT PORT 3000 ==> 80 của EC2 - [x] Config các security group: - [x] Đối với Inbound: 1. HTTP(80) Permit: 0.0.0.0/0 (Tất cả luôn :smiley:); 2. SSH(22) Permit: 0.0.0.0/0 (Config cụ thể sau) - [x] Đối với Outbount: 1. All-Trafic Permit: 0.0.0.0/0 - Đối với Task Pentest: (XeusNguyen - Building Robust Scan) - [x] Xây dựng xong các Task ScanPort - ScanTech - [x] Xây dựng xong Vul-Scan (Basic Context - DefaultChoice) - [x] Thông báo các URL lỗi và Cách thức có thể thực hiện sửa lỗi **Default** - [x] Đang thực hiện: Xây dựng Context Ad - Scan ra được các lỗi lớn SQLi, XSS - Phụ thuộc nhập vào các đường dẫn khi ta scan - thông thường nếu lỗi nằm ở ngoài thì ta có thể trực tiếp phát hiện thông qua fuzz - [x] Đang thực hiện: Xây dựng WEB-API cho Task Bot - Đối với Task Bot-Discord: (Đức - Building Bot Discord) - [x] Tiến hành khởi tạo và thêm bot vào server Discord - [x] Thực hiện Get thông tin thông qua API (hiện đang đang test trên api fake) - [x] Trả về thông báo các thông tin cần trên Server Discord bằng prefix được set sẵn - [X] Đang thực hiện: Tấn công bằng cách Post lệnh thông qua bot. - [X] Đang thực hiện: Hoàn thiện Bot đầy đủ các chức năng nêu trên mô hình ## Kết quả đồ án hiện tại - Cơ bản đã hoàn thành xong các chức năng và yêu cầu của hệ thống - Hiện tại bot vấn phải dán cứng link của web tấn công --> đang phát triển để có thể config ngay trên giao diện discord người dùng - Các quá trình scan thành công --> nhưng mất khá nhiều thời gian để hoàn thành --> Việc phát triển đặt ra là phải kết hợp với scan tay và tool automate thì tăng hiệu quả - Thỏa mãn các yều cầu về đề tài nhưng về vấn đề trực tiếp sửa lỗi vô trong mã nguồn thì vẫn chưa thể giải quyết ## Phát triển - Hoàn thiện các giao diện bot cho thân thiện với người dùng - Nên nghiên cứu và xây dựng các template phù hợp cho ZAP nếu muốn pentest với ZAP - ở tầng sâu hơn - Ngoài ra còn có rất nhiều cách khai thác khác mà fuzz tự động không thể nên --> Tìm hiểu và khai thác bằng manual để rồi automate sẽ tốt hơn - ... # English ## Introduction and method presentation - Problem: Learn AWS Cloud, build a program to analyze and monitor security weaknesses from the outside. - Learn about Linux operating system: Choose ubuntu Linux environment as VPS environment to host website ![](https://i.imgur.com/4cupeWJ.png) - Learn about the AWS environment ==> The team has built a specific website, **Juice-Shop OWASP TOP 10**, a large web site for learning about pentest ![](https://i .imgur.com/oydNJUP.jpg) - With VPC: use the default VPC and network of the provided AWS system - The rules and ports that are open for the system are included in the security group and routing table with **all-range 0.0.0.0/0** open for all traffic from outside entering the system through. port 80 and configure specific ips to access SSH via port 22 from outside to inside - **Not yet applied loadblancer: Because hosting only works on 1 EC2, it is not necessary to apply loadblancer.** - Build the project with **Docker** ==> The container already exists in the juice-shop and opensource to implement the given system implementation. [Link Docker-Image](https://hub.docker.com/r/bkimminich/juice-shop) ![](https://i.imgur.com/4rcvdoA.png) - About learning Discord and telegram: These are 2 very popular platforms - Here the team intends to build a bot to handle receiving notifications or vulnerability attacks through a built-in API server - Will be detailed below - About finding out TOP 10 owasp: This is a commonly presented security standard and this is the standard for performing pentest published annually by owasp organization. - To apply owasp detection and attack the group uses ZAP (Zed Attack Proxy), a very famous pentest tool and provided by OWASP - Suitable for building a pentester engine with extensive AddOns and updated frequently - The application of ZAP will facilitate building a series of processes to pentest a web including recon, exploit, report and suggest tasks ==> Advantages to build a visual application with addon will be built-in. - And if you want to understand more, we should use the manual method on the basis of the tool, such as setting up the appropriate context such as authens for login or new forms of attack such as 403bypass,... ![](https://i.imgur.com/WRcLh0R.jpg) - Some research on OWASP and basic OWASP LABs on TryHackMe: 1. [Research OWASP Top 10](https://hackmd.io/@XeusNguyen/By700eFks) 2. [JuiceShop-TryhackmeLAB](https://hackmd.io/@XeusNguyen/HJAecr7xs) 3. [Research SQLi-Portswigger](https://hackmd.io/@XeusNguyen/SyHN3vdlj) 4. [Practical SQLi-Portswigger](https://hackmd.io/@XeusNguyen/SJb_GMnxj) 5. [Practical BlindSQLi-Portswigger](https://hackmd.io/@XeusNguyen/S1dDCM1bi) 6. [Practical XSS-Portswigger](https://hackmd.io/@XeusNguyen/HJkDOHr-i) ## Application model used to pentest a specific web through project building - The system will include 3 parts: - A bot to notify user via discord application platform - User only need to interact with bot to perform attack and get web test notification - Web API (Flask or Fast API) to build interaction with bots, we use REST API to create query systems for it and receive and process json data in both directions. - Server performs test execution issues such as port scanner using TCP/IP methods for confirmation, technical scanner using API from wallpalyzer and vul scanner using ZAP - Deployment diagram: [Link of deployment diagram](https://drive.google.com/file/d/1Ammna-hfzIx1T9X-L6em_FZhrC0aWcJp/view?usp=sharing) ![](https://i.imgur.com/khtTlxp.png) - Description: 1. Activity will be interactive via bot built on discord. 2. The bot will perform the work using the API that has been arranged through the command dumped to the Web API to process. 3. The completed job returns the results as a json file and reports if necessary - Request: 1. Setting up ZAP needs a Proxy => always use Localhost(127.0.0.1:8080) 2. It is necessary to build a reasonable context for ZAP (Initially, extremely basic payloads are quite difficult to pentest specifically - Can't be more specific by hand) + use reasonable Addons to detect vulnerabilities and report report 3. ... - For Task Pentest: (XeusNguyen - Building Robust Scan) - [x] Construction of ScanPort Tasks - ScanTech - [x] Finished building Vul-Scan (Basic Context - DefaultChoice) - [x] Report Error URLs and How to Fix Errors **Default** - [x] In progress: Building Context Ad - Scans out big errors SQLi, XSS - Depends on entering the paths when we scan - usually if the error is outside, we can directly detect the information. via fuzz - [x] In Progress: Building a WEB-API for Task Bot - For Task Bot-Discord: (Germany - Building Bot Discord) - [x] Initialize and add bots to Discord server - [x] Implement Get information through API (currently testing on fake api) - [x] Returns the required information on the Discord Server with the pre-set prefix - [X] Ongoing: Attack by Posting commands through bots. - [X] Ongoing: Completing the Bot with all the functions mentioned on the model ## Current project results - The system's functions and requirements have been basically completed - Currently the bot has to hard-stick the link of the attack web -> under development so that it can be configured right on the discord user interface - The scanning process is successful --> but it takes a long time to complete --> The development must be combined with manual scanning and automation tool to increase efficiency. - Satisfy the requirements of the topic, but the problem of directly fixing errors in the source code cannot be solved. ## Develop - Improved bot interfaces for user-friendliness - Should research and build suitable templates for ZAP if you want to pentest with ZAP - at a deeper level - There are also a lot of other exploits that automatic fuzz can't -> Learn and exploit by manual to automate will be better - ...

    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