Hadrien Nobels
    • 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
    # NCMB : Insurance and banking ![](https://i.imgur.com/BMNlibj.png) This project aimed to develop a software that will be used by clients in order to access and manage relative information. Regarding this, this software has been developped in order to increase the security regarding the authenticity, the confidentiality and the data integrity of the exchanged messages. The communication between every stakeholders will be asymmetrically encrypted. Thanks to the mobile application, the access to the website will be secured according to the Two-Factor authentication. ## General Information The project has 3 main infrastructure components: a webserver with a website of the bank, a database server to store all the data and a client with a mobile app. The website and the mobile app enable the clients to perform 4 operations: get a credit card, make a bank transfer, buy stocks and take out a loan. ### Built With During the implementation of the project, as series of tools and technologies were used to fulfil separate tasks. First of all, the database was hosted by a [MySQL](https://www.mysql.com/) server, which is a database service. All the queries to the server were then also written in the MySQL language to access the database. Furthermore, a few Programming Languages have been used throughout the project. [Python](https://www.python.org/) was used to implement the mobile app, because of its useful libraries and ease of use. The most important library used in Python was certainly the [MySQL Connector for Python](https://dev.mysql.com/doc/connector-python/en/) to link the mobile app to the MySQL database. The connections from the webserver to the MySQL database were implemented using [php](https://www.php.net/) because of the built-in libraries that it offers. Finally, to create the website, the easiest tool to have popups and control the layout of the web page is [HTML CSS](https://www.w3schools.com/html/html_css.asp). ## Getting Started ### Prerequisites In order to rebuild the architecture in real life, the needed components are 2 routers (R1, R2), 2 servers (database, web application). For simplification purpose, the infrastruture can be rebuild using 5 virtual machines (VM) provided by the SEED Labs project: [SEEDUbuntu 20.04](https://seedsecuritylabs.org/labsetup.html) which are Linux 64-bit, Ubuntu 20.04 LTS machine dedicated for being 2 routers, 1 web server, 1 database server and a client ### Installing To set up the 5 VMs on VirtualBox, you can follow these [instructions](https://github.com/seed-labs/seed-labs/blob/master/manuals/vm/seedvm-manual.md). ##### R1 This first router should be configured with the following command : ``` # Let NetworkManager manage all devices on this system network: version: 2 renderer: NetworkManager ethernets: enp0s3: addresses: - 192.168.1.109/24 routes: - to: 192.168.0.0/24 via: 192.168.1.54 nameservers: addresses: [8.8.8.8, 8.8.4.4] enp0s8: dhcp4: yes nameservers: addresses: [8.8.8.8, 8.8.4.4] enp0s9: addresses: - 192.168.2.204/24 nameservers: addresses: [8.8.8.8, 8.8.4.4] ``` ``` sudo iptables -A FORWARD -m conntrack --ctstate ESTABLISHED -j ACCEPT sudo iptables -A FORWARD -p tcp -d 192.168.1.62 -j ACCEPT sudo iptables -A FORWARD -p tcp --dport 3336 -s 192.168.2.72 -d 192.168.0.30 -j ACCEPT sudo iptables -A FORWARD -j REJECT ``` ##### R2 This second router should be configured with the following command : ``` # Let NetworkManager manage all devices on this system network: version: 2 renderer: NetworkManager ethernets: enp0s3: addresses: - 192.168.0.12/24 nameservers: addresses: [8.8.8.8, 8.8.4.4] enp0s8: addresses: - 192.168.1.54/24 routes: - to: 0.0.0.0/0 via: 192.168.1.109 nameservers: addresses: [8.8.8.8, 8.8.4.4] ``` ``` sudo iptables -A FORWARD -m conntrack --ctstate ESTABLISHED -j ACCEPT sudo iptables -A FORWARD -p tcp --dport 3336 -s 192.168.1.62 -j ACCEPT sudo iptables -A FORWARD -p tcp --dport 3336 -s 192.168.2.72 -d 192.168.0.30 -j ACCEPT sudo iptables -A FORWARD -j REJECT ``` ##### Database The VM file /etc/netplan/01-network-manager-all.yaml should be configured as follows ``` # Let NetworkManager manage all devices on this system network: version: 2 renderer: NetworkManager ethernets: enp0s3: addresses: - 192.168.0.30/24 routes: - to: 0.0.0.0/0 via: 192.168.1.54 nameservers: addresses: [8.8.8.8, 8.8.4.4] ``` The database should be a mysql server installed with ``` sudo apt install mysql-server ``` and be started with ``` sudo systemctl start mysql.service ``` ##### Web application The VM file /etc/netplan/01-network-manager-all.yaml should be configured as follows ``` # Let NetworkManager manage all devices on this system network: version: 2 renderer: NetworkManager ethernets: enp0s3: addresses: - 192.168.1.62/24 routes: - to: 192.168.0.30 via: 192.168.1.54 - to: 0.0.0.0/0 via: 192.168.1.109 nameservers: addresses: [8.8.8.8, 8.8.4.4] ``` The web application should be a Apache2 server installed with ``` sudo apt install apache2 ``` and be started with ``` sudo systemctl status apache2 ``` The source code of the website that is included in the archive should be put in the /var/www/ folder. ##### Client The VM file /etc/netplan/01-network-manager-all.yaml should be configured as follows ``` # Let NetworkManager manage all devices on this system network: version: 2 renderer: NetworkManager ethernets: enp0s3: addresses: - 192.168.2.72/24 routes: - to: 0.0.0.0/0 via: 192.168.2.204 nameservers: addresses: [8.8.8.8, 8.8.4.4] ``` The client only needs to have the folder SIRS containing the `mobileapp.py` file as well as the encryption keys. ##### Mobile application To run the mobile app, a few commands are needed to first install the correct packages, those are: ``` pip install mysql-connector-python sudo apt-get install python3-tk ``` Afterwards, just running the line ``` python mobileapp.py ``` runs the mobile app. Then, the user should be asked its username and 6-digit password, as well as the account that this client wants to access. After the password is checked and that it is confirmed that this account belongs to the client, the mobile app opens and the client can make all sorts of actions. At the end, just clicking on "Exit the app" closes the program. ## Demo After a successful login on the website or the mobile app, you can perform 4 operations: get a credit card, make a bank transfer, buy stocks and take out a loan. ![](https://i.imgur.com/FrpgZH0.png) The connect page of the website ![](https://i.imgur.com/xZhr4L1.png) The home page of the website ![](https://i.imgur.com/KACKmr5.png) The popup on the website to take out a loan ![](https://i.imgur.com/uKM4O1T.jpg) The home page of the mobile app ![](https://i.imgur.com/XxqYuWm.png) The popup on the mobile app to get a credit card ![](https://i.imgur.com/MFhgRO1.jpg) The popup on the mobile app to make a bank transfer ## Additional Information ### Authors * **Hadrien Nobels** - [HadrienNobels](https://github.com/HadrienNobels) * **Nicolas Cuveillier** - [nicolas-cuveillier](https://github.com/nicolas-cuveillier) * **Gilles de Waha** - [gillesdewaha](https://github.com/gillesdewaha) ### Acknowledgments * Thank you to Professor Miguel Pardal and Professor Ricardo Chaves for the lectures necessary for the implementation of our security systems. * Thank you to Afonso Gomes for the help during the lab classes and the weekly feedback on our progress.

    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