themangokid
    • 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
    # Pluggpapper: Dator- och nätverksteknik (OS, Terminal, Security) ## Samlingsdokument ###### tags: `Dator- och nätverksteknik` `daodac` `terminal` `operativesystem` + The most important to know is OS, terminal and then security. ## Operative system * Ett operativ system (OS) måste finnas för att vi ska kunna använda en dator * Länk mellan användare och hårdvara * Ett OS sköter bl.a. * Inmatning och utmatning av data * Minneshantering för program * Processprioritering * Gränssnitt som tillåter programmen att "prata" med hårdvaran ## **Operativsystem - Huvudsakliga syfte** * Fortsättning: * Windows, Dos, Linux, MacOS, iOS, Unix, Android, Ubuntu, Kali, Solaris, Arch, Solaris, Fedora, Chrome OS * Headless => Inget GUI (Graphical User Interface) * Ssh:a => Använd terminalen för att gå in på en annan dator. * Är den del i datorn som kopplar ihop hårdvaran (och fast programvara) med mjukvaran. * Funktioner: * **Security** * **User management** * Handles the users, passwords and privileges of the OS. * **Job accounting** * Handles the users processes which also entail multiple users logged in at the same time * **Coordination between other software and users** * "Operating systems also coordinate and assign interpreters and compilers" * Compiler: Runs code via a compiled file, e.g. a .exe file. * Interpreter: Runs code via direct input into the terminal * **Memory management** * It keeps track of memory, i.e which bytes of memory are occupied by each program and which bytes are free. * The OS decides the order in which processes are granted access to memory, and for how long. * It allocates the memory to a process when the process requests it and deallocates the memory when it is no longer needed. * **Processor management** * This function of the OS is called process scheduling. * Keeps track of the status of processes. * **Device management** * Måste finnas om vi ska kunna använda en dator. * Länk mellan användar och hårdvara. * Sköter bland annat: * Inmatning och utmatning av data * Minneshantering för program * Processprioritering * Gränssnitt som tillåter programmen att "prata" med hårdvaran * Består av: * Systemfiler * Programfiler * Drivrutiner * (Bootladdare/Bootloader) ![Loopen](https://cdn.discordapp.com/attachments/885115655504920606/903538241142149130/unknown.png) * Ett OS sköter bl.a. * Inmatning och utmatning av data * Minneshantering för program * Processprioritering * Gränssnitt som tillåter programmen att “prata” med hårdvaran * Loopen * Processer * De program och tjänster som körs på datorn. Kostar mer att starta men har * Tjänst (Service) * Ett program som körs i bakgrunden * Trådar (Threads) * En process eller program kan bestå av flera trådar och gör då flera saker parallellt. * `"A process, in the simplest terms, is an executing program. One or more threads run in the context of the process. A thread is the basic unit to which the operating system allocates processor time. A thread can execute any part of the process code, including parts currently being executed by another thread."` * Virtuellt minne * Används när arbetsminnet inte räcker till. Datorn lagrar då data på hårddisken i en s.k. växlingsfil eller pagefile. Filen heter pagefile.sys i Windows och ligger dold i roten på systempartitionen. * Är väldigt laggigt, men är en nödlösning. * GUI * Graphical User Interface är benämningen för det grafiska gränssnittet * Eller "det man ser" * CLI * Command Line Interface är benämningen för teckenbaserat användargränsnitt * T.ex. Terminal, CMD, Bash ## Allmänt * Alla OS är bara kod! * Parallella körningar * Exempel på schemaläggning: * FIFO (First In, First Out) * LILO (Last In, Last Out) * Process om körs i bakgrunden * `herman$ sh minecraft.sh &` * '& gör att det körs i bakgrunden ## Terminal * Terminal har två definitioner (ordet har två olika meningar) * En där terminal refererar * Anänds som en brygga (interface) mellan terminalen och operativsystemet En sak som man ofta vill göra med terminal skript och program är att man vill installera saker och göra det på ett strukturerat sätt så att man kan återskapa samma struktur på andra datorer. Detta görs med hjälp av ett så kallat installationsskript, mer om det nedan. För att skapa ett installationsskript för bash i terminalen: Skapa en ny fil med ett lämpligt namn, till exempel "install.sh" Öppna filen i en nano/vim/textredigerare och lägg till följande rader: ```bash #!/bin/bash ``` Lägg till de kommandon som krävs för att installera programmet. För att använda Homebrew, använd kommandot "brew install" följt av namnet på programmet. ```bash #!/bin/bash brew install wget # cli-program brew install --cask discord # desktop-program ``` Spara filen och gör den körbar med kommandot: ```bash chmod +x install.sh ``` Kör skriptet med kommandot: ```bash ./install.sh ``` ## Security * **Virus** * Ett datorvirus är ett körbart program som har förmågan att infektera andra filer och på så sätt sprida sig * Ett virus kan göra skada i form av: * Ansluta datorn till ett botnet * Förstöra eller ta bort data * Rensa hela diskar * E-posta sig själv till andra i din kontaktlista * Virus kommer i många former * Vanligast är fortfarande e-postbilagor * Skript via e-post * Infekterade USB-drives * Infekterade filer som laddas hem * Vanligt bland crackade programvaror * **Trojansk Häst** * Mjukvara som verkar vara något annat än det egentligen är * Har dolda funktioner som ofta gör skada i bakgrunden * Kan hittas via aktivitetshanteraren * Kan ta över din dator på fjärr och utpressa dig * **Malware** * Huvudsyftet med malware är att tjäna pengar, stjäla information, trolla, eller vad som helst, egentligen. * **Olika sorters malware:** * Kräver interkation av användare * Skydd: Uppdaterat AV-program, utbildad persona * Worm * Kräver inte interaktion av användare * Skydd: Uppdaterat AV-program, brandvägga * Trojan Horse * Utger sig för att vara något men har en dold funktio * Skydd: Uppdaterat AV-program, utbildad persona * Buffer Overflow * Blottlägger minne genom att skicka input till systeme * Skydd: Uppdaterat OS och progra * Spyware * Samlar information om användaren utan dess vetska * Skydd: Uppdaterat AV-program, eller antispyware-progra * Adware * Fyller användarens dator med (ibland skadliga) annonse * Skydd: Uppdaterat AV-program, utbildad personal ---- ## Security scenarios * ## Scenario 1: ||Malware Infection|| * Your company has recently suffered a ||malware infection|| that appears to have originated from an employee user's computer * The user in question is a Windows user who frequently browses ||shady websites|| * Your task is to investigate the source of the ||infection|| and implement measures to prevent similar incidents in the future * There has been an abnormal amount of suspicious connections to random servers * The computer is now extremely slow and slow when signing on Windows --- * Questions * How would you go about investigating the source of the malware infection? * What steps would you take to remove the malware from the infected machine? * What measures would you implement to prevent similar incidents from occurring in the future? * How would you educate users on safe practices when using the terminal and accessing the system? --- * ## Scenario 2: ||Password Cracking|| * Your organization's IT team has noticed multiple failed login attempts on a user's account in the system * Upon investigation, it is discovered that an attacker has been attempting to ||crack the user's password using a brute force method|| * One could analyze the system logs and implement measures to prevent similar attacks --- * Questions: * What steps would you take to analyze the system logs and identify the attacker? * What measures would you implement to prevent further ||password cracking attempts||? * How would you educate users on creating ||strong passwords|| and ||secure login practices||? * How would you monitor the system to detect and respond to similar attacks in the future?

    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