P F
    • 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
    :::success # AS Lab 1 - Threat Modeling **Document Owner: Fiege Polina** Participants: Ivan & Alexandr Reviewer: Nikita ::: **Application Name:** Сhicle **Application Version:** pre-alpha 0.0.2 **Description:** :::info In this assignment, you will perform threat modeling for an example application. There is a company that wants to implement a **youtube-like application**. At this stage they are designing the system and ask you for a security consulting. They want to know what potential issues they may have and how to mitigate them. ::: Following the OWASP instructions, I first identified the main user groups. Due to the fact that there was no description of any administration tools in the declared functionality (for moderators or administrators of the platform), there are only two key users: an authorized user and an unauthorized one. To simplify understanding, I renamed them to **"user"** and **"viewer"**. <center> | Features | User | Viewer | | ---------------------------------------------------------------------------------------------------------- |:----:|:------:| | 1. Upload and delete videos | + | - | | 2. Get video streams with desired quality | + | + | | 3. Search available videos (filtering and sorting by some attributes) | + | + | | 4. Display user profile and uploaded videos | + | + | | 5. Some videos are private (only specific user) and some are hidden (not shown in search and on user page) | + | - | | 6. Display view history | + | - | | 7. Display, create and delete comments on video | + | - | Table 1 - Main features of each user-group </center> This is what concerns the conditionally user side of the application. Now I would like to look at the technical side of the video download process. To do this, I ask you to pay attention to the approximate model of the application shown in the image below. <center> ![](https://i.imgur.com/XWH01Ag.png) Figure 1 - General scheme of Сhicle </center> Now it is necessary to determine the external dependencies ([link to table](https://docs.google.com/spreadsheets/d/1dbRTAxZC0da2E0Q1GCDUhth2vCkwQUwNcSSDOcJPJoE/edit?usp=sharing)) of each of the application elements, thereby determining their interaction with each other. <center> ![](https://i.imgur.com/j7QMNlw.png) Figure 2 - Table of External dependencies </center> :::info 1.1 Create a table for Entry points ([link to table](https://docs.google.com/spreadsheets/d/1n1NLne1yVhfWohxD2YIawG4X3tE8IIyAgTZ-MFF30bg/edit?usp=sharing)) ::: The input points of the system were defined as follows: HTTPS-port is the main entry point, behind which the frontend, backend and S3 parts of the system are located. Below you can see a table with a full description of all handlers and pages. <center> ![](https://i.imgur.com/A1cTaS8.png) Figure 3 - Table of Entry points </center> :::info 1.2 Create a table for Trust levels ::: Now I need to define trust levels in order to understand which user or process will have access to various entry points and various resources of the Chicle application. You can see the full picture illustrating all levels of trust and their description in the table below or at this link ([link to table](https://docs.google.com/spreadsheets/d/1qQ0Jua8Ve7IZzblDguspHwAUD8DhM1ALjdDU3k4KXUk/edit?usp=sharing)). :::info 1.3 Create a table for Assets ::: The Asset (resource) table is a complete description of both the conditionally physical objects of the system (user data in the form of text, for example) and the possibilities (ability to manage the system under administrator rights, for instance) that an attacker may be interested in in order to commit illegal actions ([link to table](https://docs.google.com/spreadsheets/d/18COJ3TRM0QvC7N3AjPbs3hDuvQCOljaf0th_XNxNSNA/edit?usp=sharing)). :::info 2. Select at least 3 use cases that you think are the most interesting and prepare **Data Flow Diagrams (DFD)** for them. ::: Let's consider a few cases of using the application. For example, a user wanted to delete one of their videos. I mean that the user has already logged in to his account and has now gone to his account page. Now in it, he sends a request to delete the preferred video. The handler accesses the storage to request access to this video (that is, to check if the video is correct). Then the deletion process takes place, which is also associated with the video storage, since this action must be recorded. Then, through the response form, the user receives a response to his action. <center> ![](https://i.imgur.com/uhDzlx6.png) Figure - DFD "User wants to delete the video" </center> In the next case, the user wanted to create a new comment under the video. To do this, he needs to go to the page of a specific video. The video will be uploaded along with all the information belonging to it. In particular, a list of comments already existing under this video will be displayed. After that, the user will have the opportunity to leave a comment in text form. The comment will be processed and checked for the presence of prohibited information (here I mean a restriction on the placement of links leading to third-party resources, the use of prohibited statements, etc.). After verification, the comment will be published and shown to the user. <center> ![](https://i.imgur.com/UTdgyXk.png) Figure - DFD "User wants to create a new comment" </center> In this case, the user wants to open access to his video for some users (by condition, these users are in groups associated with this user, for example, these are his Subscribers, Friends or another group). After the user sends a change request, the video is checked for the possibility of these changes (so that the user does not do again what has already been done, for example, the video is already available only to this group). After permission, the required user group is selected. Then the status of the video changes, then the changes are applied, simultaneously opening access to the video for the selected users. <center> ![](https://i.imgur.com/kJQ4wn7.png) Figure - DFD "User wants to change the access to the video" </center> ## Part 2 - Threat Modeling Now when I have decomposed the system I can determine possible threats. Categorizations such as STRIDE allow to identify threats in the application in a structured and repeatable manner. > Note that you can skip category, if you think there is no threat for that data flow that falls in that category. Guided by this formulation, I transferred to the threat table all the resources of the Chicle application that I identified at the last step. And then I consistently searched for possible threats to the data flow from the categories proposed by the model. Thus, the table displays empty fields opposite those resources that are inaccessible to the attacker in any case. That is, I want to say that we were able to design together a system that is sufficiently protected from attacks (not taking into account its small scale). An attacker can manipulate inside user interfaces by gaining access to a user's account through any method of social engineering, for example. For possible attacks by bots or scripts, we suggest tracking suspicious user activity and using traffic monitoring in the form of IPS/IDS systems. As for internal servers and services, an attacker can access them only in case of errors by an administrator or an engineer at the stage of debugging or testing some functions in the system, however, and here we believe that this is too large an area for possible attacks. The attacker just gets access to all the internal servers and can do whatever he wants. You can use [this link](https://docs.google.com/spreadsheets/d/1LArHRJnKeEt3BuoUcsi4yhMkOB0sB74U00stRpJ-LCg/edit?usp=sharing) to go to the table designed according to the STRIDE model. ## References: 1. [Threat Modeling Process | OWASP](https://owasp.org/www-community/Threat_Modeling_Process#) 2. [Youtube Documentation](https://developers.google.com/youtube/documentation) 3. [CVSS Calculator](https://www.first.org/cvss/calculator/3.0)

    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