Ivan Christian
    • 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
    # Hw 6 SS # 1 Suppose the storage of each password takes 10 bytes and the storage of each hash value takes 5 bytes. Also, as shown in the diagram, each chain consists of 4 passwords and 3 hash values. ![](https://i.imgur.com/M4yyhHY.png) #### 1.1 $10^6 * 3 * 5$ bytes = 15 MB $10^6 * 4 * 10$ bytes = 40 MB Total estimated storage = 55 MB #### 1.2 Suppose that the hacker is very lucky and gets a hash value that comes from the original password. Minimum hash function : 1 Suppose that the hacker is very unlucky and found a hash value at the end of the chain. Maximum has calculations $4-1$ = 3 The range : $1 ≤ x ≤ n-1$ where $n$ is the length of chain (in this case is 4) # 2 Honeywords generates fake password to protect user passwords by creating a fake password to notify the admin when a hacker uses said password. Hackers wouldn't be able to differentiate the actual and fake passwords, since both are hashed and are stored in the database. A proposed method is by creating a word dictionary of common words/ passwords and use them as honeywords to make sure that when a hacker tries to break into the account by sifting through the commonly used password list, the admins are notified. This method essentially creates a dictionary of possible "hits" that is stored for a certain username. The honeychecker is able to perform 3 different methods to generate 19 different honeywords to acquire `K = 20` "fake" passwords. The 3 methodologies are as follows: 1. chaffing-by-tweaking 2. chaffing-with-a-password-model 3. hybrid ### chaffing-by-tweaking This methodology describes tweaking random character or digit in the password. In this project, only take-a-tail method is adopted #### take-a-tail This describes the server prompting the user to 'add a tail' (in this case, just random numbers) of at least `t = 4` length. The reason for such adoption is to ensure flatness. ### chaffing-with-a-password-model This methodology describes replacing the word input by the user with another word extracted from the dictionary. ### hybrid This methodology describes both replacing the word and tweaking the tail with random number, of the same length as what the user had input. The following is an example of what a hybrid method would look like: ``` {'_id': ObjectId('642be00d201b8071bea73399'), 'username': 'jake', 'password0': 'corosif6692', 'password1': 'toucher8620', 'password2': 'baggier4511', 'password3': 'peralta1111', 'password4': 'welting5013', 'password5': 'webworm2530', 'password6': 'tannaic3070', 'password7': 'recheck6649', 'password8': 'pascola5417', 'password9': 'inherle4098', 'password10': 'belayer1002', 'password11': 'gnatter2404', 'password12': 'osteria9730', 'password13': 'snugify4472', 'password14': 'punatoo1281', 'password15': 'fishman4237', 'password16': 'twiglet4989', 'password17': 'spokane1789', 'password18': 'eschele9459', 'password19': 'pipages3538'} ``` This is the function to generate the honeywords: ```python= def chaffing(method, userid, password, tail, t): seed(str(userid)) true_index = randint(0, K) print(f"true_index: {true_index}") answer = {} for i in range(0, K): answer["password" + str(i)] = 0 if method == 'chaffing-by-tweaking': """ This method will assume tail-tweaking along the password. """ for i in range(0, len(answer)): answer["password" + str(i)] = password + tweak_digit( t) if i != true_index else password + tail return answer elif method == 'chaffing-with-a-password-model': """ Assume that the password is separated by password (alpha) and tail (numeric) """ honeywords = replaceWord(password) for i in range(len(answer)): answer["password" + str(i)] = honeywords[ i] + tail if i != true_index else password + tail return answer elif method == 'hybrid': """ Combines both replace word and tweaking of digits """ honeywords = replaceWord(password) for i in range(len(answer)): answer["password" + str(i)] = honeywords[i] + tweak_digit( t) if i != true_index else password + tail return answer else: print(f"expected 'chaffing-by-tweaking' \ or 'chaffing-with-a-password-model' \ or 'hybrid' method \ but instead, got {method}") ``` ogin to `username=jake` account. (with password `peralta1111`) A demonstration of 3 different outcomes will be displayed: ### Case 1: Matched Original Credentials ![](https://i.imgur.com/0IVsYcG.png) This occurs when the user/adversary keys in the `sugarword` for password. The `honeychecker` then allows the user to login to their account ### Case 2: Wrong Credentials ![](https://i.imgur.com/Cd2k7qz.png) The server will not reveal to the adversary which field they got wrong. This protects the user base from getting revealed, which results in brute force attack ### Case 3: Matched the honeyword credentials ![](https://i.imgur.com/Y8nYGzF.png) This occurs when the adversary keys in the `honeyword` for password. The user should not be expected to forget their own tail and key in the `honeyword`'s tail either, since this generation is not revealed to the user. Hence, it should suffice to say that if a user attempts to login to an account with a honeyword, then the admin and the owner of that account should be immediately notified so that the admin may look at the logs, and that owner should change their password. Disclaimer: It is understood that passwords should be hashed, but for exercise's sake we did not in order to test the cases. ### Possible Attack Pattern Goal: compromise the user login ![](https://i.imgur.com/Rb2Yuun.png) ### Conclusion Having a honeyword implemented is a fantastic idea, keeping in mind that all passwords should be hashed and/or encrypted before storing in the database meant that an adversary that may have exploited the server and obtained a set of hashes from multiple accounts will have to: 1. break all the hashes in the sweetwords 2. conclude which password index contains the sugarword 3. at risk of `(k-1)/k` probability to getting caught In recent development, users have also been recommended to increase the length of their password, while the character space of the passwords is no longer as important anymore (i.e., it is sufficient for password to be of `length=20` but only contains alphanumeric). By enforcing the word length and the tail length, it is possible to strengthen the password bit entropy while increasing the difficulty of the game for the adversary to break. Such implementation, thus, strengthens the security multifolds. Any hint of an adversary wrongly guessing the user's password will spark an investigation immediately and prompt the owner of that account to change their password. ## System Security Homework 6 Backend ### Engine Flask (backend) ReactJS (frontend) MongoDB (through docker) ### Installation 1. `npm install` 2. `sudo docker pull mongo; sudo docker run --name mongo-db -p 27017:27017 -d mongo:latest` 3. `python3 main.py` # 3 According to the company's security whitepaper, they use the bcrypt algorithm to hash and salt user passwords. Additionally, they enforce the use of strong passwords and two-factor authentication for added security. In terms of comparing Dropbox's password storage solution with recent versions of operating systems, it's important to note that most modern operating systems also use hashing and salting to store user passwords securely. For example, Windows 10 and macOS Mojave use the PBKDF2 (Password-Based Key Derivation Function 2) algorithm to hash and salt passwords. Linux distributions also typically use hashing and salting to store passwords securely, with the default algorithm being SHA-512. However, the specific implementation of password storage can vary depending on the distribution and configuration. Overall, Dropbox's password storage solution appears to be secure and on par with the password storage solutions used by modern operating systems. It's important to note that while these solutions can help protect against password-based attacks, users should still practice good password hygiene by using strong and unique passwords, and enabling two-factor authentication whenever possible. #### Table form: ![](https://i.imgur.com/WZ9nm6Y.png)

    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