Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Added report outline doc
- Loading branch information
James Shuttleworth
committed
Sep 30, 2021
1 parent
8f2d5f4
commit 0643195ec9119319122863b4240ed115f96278d8
Showing
5 changed files
with
107 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -3,3 +3,4 @@ | ||
/rt-venv/ | ||
/src/answer.py | ||
/html/ | ||
/submission/5062CEM_2021_22_SepJan_CW1_main_sit_0123456789.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
simple-term-menu | ||
pdoc3 | ||
markdown | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
# 5062CEM Coursework 1 | ||
|
||
- Student ID: (INSERT YOUR STUDENT ID) | ||
|
||
|
||
## Task 1: Passwords and Hashes (10%) | ||
|
||
If the hashes produced are all 2 bytes, how many possible hash values are there? Explain how you calculate this value. | ||
|
||
|
||
(Insert your answer here) | ||
|
||
|
||
With minimum password length of 3 and maximum of 6, and possible characters being all upper and lowecase letters and digits (ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789) how many possible passwords are in our "search space"? Explain how you calculate this value. | ||
|
||
|
||
(insert your answer here) | ||
|
||
|
||
One of these numbers is larger than the other. What implications does this have for security if this hash function is used in storing passwords? What implications does this have for our rainbow table? | ||
|
||
## Task 2: Implementing the table (30%) | ||
|
||
Include your `generateTable` function below. The three back-ticks before and after the code tell Markdown that the text between should be marked-up as code. | ||
|
||
|
||
``` python | ||
def generateTable(chainStarts, hashFunc, guessFunc, chainLength, minLen=3,maxLen=6,charset=defaultCharset): | ||
""" Create a rainbow table for the given hash function | ||
Arguments: | ||
chainStarts -- a list of starting values. The length of this list determines how many chains will be constructed. | ||
hashFunc -- a hash function to be used in the hashing step. | ||
guessFunc -- a function that can produce valid inputs to the hash function. The function should accept a value and the keyword arguments `minLen` (minimum guess length) `maxLen` (maximum guess length) and `charset` (a string containing all valid characters to be used in the table). These will be passed directly from the arguments of the same names given to this funciton. | ||
chainLength -- length of each chain | ||
minLen -- minimum length of values to be hashed | ||
maxLen -- maximum length of values to be hashed | ||
charset -- string containing all valid characters for values being hashed | ||
""" | ||
# Your code goes here | ||
``` | ||
|
||
## Task 3: Parameters (10%) | ||
|
||
Discuss how to select the best parameters for generating a rainbow table. | ||
|
||
(Write your answer here) | ||
|
||
Some hints: | ||
|
||
- You can change the number of chains and the length of each chain | ||
- What effect does changing each of these have on: | ||
- How well the table works, as in how many hashes it can break? | ||
- How long it takes to create? | ||
- How much space it takes up? | ||
- How long it takes to search the chains for hashes? | ||
|
||
|
||
## Task 4: Reversing Hashes (10%) | ||
|
||
What are possible passwords that produce the following hashes? | ||
|
||
- (Will add later) | ||
- | ||
|
||
(Write your answers next to the hashes above. HINT: you can check your answers by putting them into the pearson hashN function and seeing if they give you the right hash) | ||
|
||
|
||
## Task 5: Improving Guess Generation Efficiency (20%) | ||
|
||
The function that currently produces guesses is not as efficient as it could be. | ||
|
||
Discuss how the time it takes is related to the index argument and propose a solution that makes it independant of this value. | ||
|
||
|
||
(Write your answer here) | ||
|
||
## Challenge: Web service compromise (20%) | ||
|
||
Details to follow |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import markdown | ||
|
||
|
||
#Insert your student ID here | ||
student_id="0123456789" | ||
|
||
|
||
|
||
|
||
md = markdown.Markdown(extensions=['fenced_code']) | ||
|
||
input_filename = 'coursework.md' | ||
output_filename = f'5062CEM_2021_22_SepJan_CW1_main_sit_{student_id}.html' | ||
|
||
with open(input_filename, 'r') as f: | ||
html_text = md.convert(f.read())#, output_format='html4') | ||
|
||
with open(output_filename, "w") as f: | ||
f.write(html_text) |