Cybersecurity Unit 4 - Cryptography

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/51

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

52 Terms

1
New cards

Cryptography

Scrambling data so that it looks like babble to anyone except those who know the trick to decoding it

2
New cards

Algorithm (aka Cipher)

A precise set of instructions that tells programs how to scramble and unscramble data

3
New cards

Plaintext

Decrypted or unencrypted data

4
New cards

Cipher text

Data that has been encrypted

5
New cards

Cryptanalysis

Attempting to break a cryptographic system and return the encrypted message to plaintext

6
New cards

Substitution Method

Replacement of a character with a different character

7
New cards

Monoalphabetic ciphers

The same letter is used as a substitute every time.

8
New cards

Transposition

Changing the order of items

9
New cards

Scytale cipher

Spartans wrapped a ribbon around a cylinder and wrote the message across. When unwrapped, the letters would look like garbled text. It was deciphered by using a cylinder of the exact same diameter as the original.

10
New cards

Caesar Cipher

- Aka shift cipher

- Caesar's cipher uses an algorithm and a key:

- Algorithm - you offset the alphabet either to the right (forward) or to the left (backward)

- Key - How many letters the offset should be

11
New cards

Cracking a substitution cipher

Each letter is replaced by another letter from the alphabet without correlation — i.e no shift or pattern

12
New cards

Frequency Analysis

Where we use knowledge about the frequency of letters and groups of letters used in a language and then look for this pattern in the ciphertext

13
New cards

Two most frequently used letters in english?

E and T

14
New cards

Common short words?

to, in, is, at ... the, and, for, but ...

15
New cards

OTP

One Time Pad

Definition: An encryption method in which the pre-shared key is used only once. Capturing or stealing the key is useless since it will not be used again to encrypt.

16
New cards

Pros and Cons of OTP

Pros

Unbreakable!

Cons

Dependent on random pad generation

Requires both parties to have identical pad and start from the same point in the pad

Impractical for most common applications

Large pads required

Hard to generate truly random numbers

Hard to get the pads to both parties

17
New cards

Transposition Cipher

The order of the letters are changed (can be split into rows or columns and read in a certain way)

18
New cards

Polyalphabetic ciphers

Substitution based on multiplied alphabets, using a system to switch between them.

19
New cards

Steps for Vigenere Encoding

Example:

Create alphabet grid

Plaintext SCHOOLS and Password = LEARN

Using Vigenere Chart, match plaintext to password

1. Agree on a codeword

2. Write the keyword above the plaintext

3. Find the shift for each letter

4. Encode the letter

5. Repeat

20
New cards

Cryptography

The science of making and breaking codes

21
New cards

Steganography

Definition: The practice of hiding messages so that the presence of the message itself is hidden

aka "Security through obscurity" = no one knows a secret is being exchanged

aka "Hiding in Plain Sight"

Different from regular encryption which only seeks to hide the message, but not the fact that message is being exchanged

Most common is to hide text inside a graphic

22
New cards

Practical Uses for Steganography

You suspect someone is illegally distributing copyrighted pdfs or images and add hidden copyright information in them using steganography tools to to double check

You want to exchange information like passwords or sensitive images over an insecure transmission protocol like email

You want to embed secret files available only to a select few in a public forum.

23
New cards

Tools for Steganography

Photo Editing Software

Hex Editor

Exit Viewer Tool - Extract file MetaData

Binwalk

24
New cards

Photo Editing Software

Enlarge photo to find hidden text inside

Could be obscured by font size or color or position

(Use photo editing software like MS Paint, Photoshop, or Gimp)

25
New cards

Hex Editor - Hxd (Win) or Bless

Text can be hidden inside bits of the file

Using hex editor, you can see the file bits represented in Hexadecimal on the left side and in ASCII on the right side.

26
New cards

Exit Viewer Tool

Extract file MetaData (information about the file)

Use Exiftool (linux/Windows) or use an online exif viewer tool

This tool can find a secret or a CTF flag hidden through the exif data

27
New cards

Binwalk

Search a file for embedded files or code, then extract

You need to know what software was used to encrypt, in order to extract hidden text or file

28
New cards

Is linux case sensitive?

Yes

29
New cards

UP or DOWN arrow on the keyboard to toggle through past commands

Avoid retyping long lines of commands

30
New cards

TAB

Autocomplete typing filenames

31
New cards

clear

Bring you to an empty command prompt

32
New cards

Grep command

Powerful search tool that can be used with many option

33
New cards

grep keyword science.txt

Basic usage of grep is to find a word (keyword) inside a file

34
New cards

grep -i keyword science.txt

Use the -i option to ignore capitalization so it will find 'keyword' or 'Keyword'

35
New cards

grep 'any group of words' science.txt

Use the single quotes ' ' to search for a phrase or pattern

36
New cards

v

display those lines that do NOT match

37
New cards

n

precede each matching line with the line number

38
New cards

c

print only the total count of matched lines

39
New cards

/ (pwd)

(begins with forward slash)

Specifying a file or directory as an absolute path means you are specifying where it sits on the computer in absolute terms, starting from the top level

40
New cards

If an absolute path is used...

The command will do the same thing no matter what directory you are in when you execute the command

41
New cards

. (ls)

(does NOT begin with forward slash)

Specifying a file or directory as a relative path means you are specifying where it sits relative to the directory you're in right now.

42
New cards

If a relative path is used...

A command on a file will only work if that file exists in the current directory

43
New cards

After the command, use > in order to...

Put all the info that the command before > produces and stores it in the file named after >

Example:

ls > listofiles.txt

Command ls info gets stored into listoffiles.txt

44
New cards

>>

Adds data to an existing file

Example:

cat Dragons.txt >> listoffiles.txt

Takes the contents of the Dragons.txt and adds it to the end of the listoffiles.txt

45
New cards

sort

sorts alphabetically

46
New cards

sort -r

sorts in reverse alphabetical order

47
New cards

sort -R

sorts into a random order

48
New cards

Wildcard (*)

represents 'anything'

49
New cards

Pipe (|)

takes the output from one command and sends it as the input to a second command

50
New cards

Creating small working programs without having to know a programming language

Linux - Script

Windows - Batch File

51
New cards

BASH

Using the ______, we can learn the steps for scripting in Linux

52
New cards

Script (linux) - BASH

- Requires shell program

- Open a text editor and create a file with commands

- Start the script with #!/bin/bash (! is known as "shebang")

- Put only one command per line

- Save the file with the .sh extension instead of the .txt extension

- Change the file permissions to make it executable

- chmod +x