vault backup: 2024-10-30 11:06:53
48
.obsidian/core-plugins.json
vendored
@@ -1,18 +1,30 @@
|
|||||||
[
|
{
|
||||||
"file-explorer",
|
"file-explorer": true,
|
||||||
"global-search",
|
"global-search": true,
|
||||||
"switcher",
|
"switcher": true,
|
||||||
"graph",
|
"graph": true,
|
||||||
"backlink",
|
"backlink": true,
|
||||||
"outgoing-link",
|
"canvas": false,
|
||||||
"tag-pane",
|
"outgoing-link": true,
|
||||||
"properties",
|
"tag-pane": true,
|
||||||
"page-preview",
|
"properties": true,
|
||||||
"note-composer",
|
"page-preview": true,
|
||||||
"command-palette",
|
"daily-notes": false,
|
||||||
"editor-status",
|
"templates": false,
|
||||||
"bookmarks",
|
"note-composer": true,
|
||||||
"outline",
|
"command-palette": true,
|
||||||
"word-count",
|
"slash-command": false,
|
||||||
"file-recovery"
|
"editor-status": true,
|
||||||
]
|
"bookmarks": true,
|
||||||
|
"markdown-importer": false,
|
||||||
|
"zk-prefixer": false,
|
||||||
|
"random-note": false,
|
||||||
|
"outline": true,
|
||||||
|
"word-count": true,
|
||||||
|
"slides": false,
|
||||||
|
"audio-recorder": false,
|
||||||
|
"workspaces": false,
|
||||||
|
"file-recovery": true,
|
||||||
|
"publish": false,
|
||||||
|
"sync": false
|
||||||
|
}
|
132
.obsidian/workspace.json
vendored
@@ -10,25 +10,18 @@
|
|||||||
{
|
{
|
||||||
"id": "d83bb0bbeeb86eec",
|
"id": "d83bb0bbeeb86eec",
|
||||||
"type": "leaf",
|
"type": "leaf",
|
||||||
"state": {
|
|
||||||
"type": "empty",
|
|
||||||
"state": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "3ed058b7ba32ddc0",
|
|
||||||
"type": "leaf",
|
|
||||||
"state": {
|
"state": {
|
||||||
"type": "markdown",
|
"type": "markdown",
|
||||||
"state": {
|
"state": {
|
||||||
"file": "AI & Data Mining/Week 5/Lecture 9 - PRISM.md",
|
"file": "Data Structures/Week 7/Week 7.md",
|
||||||
"mode": "source",
|
"mode": "source",
|
||||||
"source": false
|
"source": false
|
||||||
|
},
|
||||||
|
"icon": "lucide-file",
|
||||||
|
"title": "Week 7"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
]
|
||||||
],
|
|
||||||
"currentTab": 1
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"direction": "vertical"
|
"direction": "vertical"
|
||||||
@@ -53,7 +46,9 @@
|
|||||||
"collapseAll": false,
|
"collapseAll": false,
|
||||||
"extraContext": false,
|
"extraContext": false,
|
||||||
"sortOrder": "alphabetical"
|
"sortOrder": "alphabetical"
|
||||||
}
|
},
|
||||||
|
"icon": "lucide-search",
|
||||||
|
"title": "Search"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -61,7 +56,9 @@
|
|||||||
"type": "leaf",
|
"type": "leaf",
|
||||||
"state": {
|
"state": {
|
||||||
"type": "bookmarks",
|
"type": "bookmarks",
|
||||||
"state": {}
|
"state": {},
|
||||||
|
"icon": "lucide-bookmark",
|
||||||
|
"title": "Bookmarks"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -71,7 +68,9 @@
|
|||||||
"type": "file-explorer",
|
"type": "file-explorer",
|
||||||
"state": {
|
"state": {
|
||||||
"sortOrder": "alphabetical"
|
"sortOrder": "alphabetical"
|
||||||
}
|
},
|
||||||
|
"icon": "lucide-folder-closed",
|
||||||
|
"title": "Files"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -79,8 +78,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"direction": "horizontal",
|
"direction": "horizontal",
|
||||||
"width": 395.5,
|
"width": 395.5
|
||||||
"collapsed": true
|
|
||||||
},
|
},
|
||||||
"right": {
|
"right": {
|
||||||
"id": "ee8f6df41634f71e",
|
"id": "ee8f6df41634f71e",
|
||||||
@@ -96,7 +94,7 @@
|
|||||||
"state": {
|
"state": {
|
||||||
"type": "backlink",
|
"type": "backlink",
|
||||||
"state": {
|
"state": {
|
||||||
"file": "AI & Data Mining/Week 5/Lecture 9 - PRISM.md",
|
"file": "Data Structures/Week 7/Week 7.md",
|
||||||
"collapseAll": false,
|
"collapseAll": false,
|
||||||
"extraContext": false,
|
"extraContext": false,
|
||||||
"sortOrder": "alphabetical",
|
"sortOrder": "alphabetical",
|
||||||
@@ -104,7 +102,9 @@
|
|||||||
"searchQuery": "",
|
"searchQuery": "",
|
||||||
"backlinkCollapsed": false,
|
"backlinkCollapsed": false,
|
||||||
"unlinkedCollapsed": true
|
"unlinkedCollapsed": true
|
||||||
}
|
},
|
||||||
|
"icon": "links-coming-in",
|
||||||
|
"title": "Backlinks for Week 7"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -113,10 +113,12 @@
|
|||||||
"state": {
|
"state": {
|
||||||
"type": "outgoing-link",
|
"type": "outgoing-link",
|
||||||
"state": {
|
"state": {
|
||||||
"file": "AI & Data Mining/Week 5/Lecture 9 - PRISM.md",
|
"file": "Data Structures/Week 7/Week 7.md",
|
||||||
"linksCollapsed": false,
|
"linksCollapsed": false,
|
||||||
"unlinkedCollapsed": true
|
"unlinkedCollapsed": true
|
||||||
}
|
},
|
||||||
|
"icon": "links-going-out",
|
||||||
|
"title": "Outgoing links from Week 7"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -127,7 +129,9 @@
|
|||||||
"state": {
|
"state": {
|
||||||
"sortOrder": "frequency",
|
"sortOrder": "frequency",
|
||||||
"useHierarchy": true
|
"useHierarchy": true
|
||||||
}
|
},
|
||||||
|
"icon": "lucide-tags",
|
||||||
|
"title": "Tags"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -136,8 +140,10 @@
|
|||||||
"state": {
|
"state": {
|
||||||
"type": "outline",
|
"type": "outline",
|
||||||
"state": {
|
"state": {
|
||||||
"file": "AI & Data Mining/Week 5/Lecture 9 - PRISM.md"
|
"file": "Data Structures/Week 7/Week 7.md"
|
||||||
}
|
},
|
||||||
|
"icon": "lucide-list",
|
||||||
|
"title": "Outline of Week 7"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -149,7 +155,9 @@
|
|||||||
"sortOrder": "frequency",
|
"sortOrder": "frequency",
|
||||||
"showSearch": false,
|
"showSearch": false,
|
||||||
"searchQuery": ""
|
"searchQuery": ""
|
||||||
}
|
},
|
||||||
|
"icon": "lucide-archive",
|
||||||
|
"title": "All properties"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -157,7 +165,9 @@
|
|||||||
"type": "leaf",
|
"type": "leaf",
|
||||||
"state": {
|
"state": {
|
||||||
"type": "git-view",
|
"type": "git-view",
|
||||||
"state": {}
|
"state": {},
|
||||||
|
"icon": "git-pull-request",
|
||||||
|
"title": "Source Control"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -165,7 +175,9 @@
|
|||||||
"type": "leaf",
|
"type": "leaf",
|
||||||
"state": {
|
"state": {
|
||||||
"type": "mermaid-toolbar-view",
|
"type": "mermaid-toolbar-view",
|
||||||
"state": {}
|
"state": {},
|
||||||
|
"icon": "trident-custom",
|
||||||
|
"title": "Mermaid Toolbar"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -186,54 +198,54 @@
|
|||||||
"mermaid-tools:Open Mermaid Toolbar": false
|
"mermaid-tools:Open Mermaid Toolbar": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"active": "3ed058b7ba32ddc0",
|
"active": "d83bb0bbeeb86eec",
|
||||||
"lastOpenFiles": [
|
"lastOpenFiles": [
|
||||||
"Pasted image 20241017132059.png",
|
"Software Project with Agile Techinques/Assignment/Assignment 1.odt",
|
||||||
"Pasted image 20241017132019.png",
|
"Software Project with Agile Techinques/Assignment/lu12412ehh9.tmp",
|
||||||
"Pasted image 20241017131912.png",
|
"Penetration Testing/Week 6/Workshop 6.md",
|
||||||
"Pasted image 20241017131740.png",
|
"Data Structures/Week 7/Week 7.md",
|
||||||
"Pasted image 20241017131525.png",
|
"Data Structures/Week 7",
|
||||||
"Pasted image 20241017131053.png",
|
"Penetration Testing/Week 6/dns-exfil-infil/securecorp.txt",
|
||||||
"Pasted image 20241017130933.png",
|
"Penetration Testing/Week 6/dns-exfil-infil/requirements.txt",
|
||||||
"Networking and Security/Week 4/Workshop 4 - Routing.md",
|
"Penetration Testing/Week 6/dns-exfil-infil/packetySimple.py",
|
||||||
|
"Penetration Testing/Week 6/dns-exfil-infil/packetyGrabber.py",
|
||||||
|
"Penetration Testing/Week 6/dns-exfil-infil/packety.py",
|
||||||
|
"Penetration Testing/Week 6/dns-exfil-infil/README.md",
|
||||||
|
"Penetration Testing/Week 6/dns-exfil-infil",
|
||||||
|
"Penetration Testing/Week 6/dns-exfil-infil/dns-exfil-infil/securecorp.txt",
|
||||||
|
"Penetration Testing/Week 6/dns-exfil-infil/dns-exfil-infil/requirements.txt",
|
||||||
|
"Penetration Testing/Week 6/dns-exfil-infil/dns-exfil-infil/README.md",
|
||||||
|
"Pasted image 20241025143543.png",
|
||||||
|
"Pasted image 20241025141715.png",
|
||||||
|
"Pasted image 20241025141348.png",
|
||||||
|
"Software Project with Agile Techinques/Assignment/Assignment 1.md",
|
||||||
|
"AI & Data Mining/Week 6/Lecture 12 - Decision Trees (ID3).md",
|
||||||
|
"Pasted image 20241025132339.png",
|
||||||
|
"AI & Data Mining/Week 6/Lecture 11 - ID3.md",
|
||||||
|
"Pasted image 20241024132906.png",
|
||||||
|
"Pasted image 20241024132411.png",
|
||||||
|
"Client Server Systems/PHPStorm Repo/workshop6/images/new_uos_logo.jpg",
|
||||||
|
"Client Server Systems/PHPStorm Repo/workshop6/fonts/glyphicons-halflings-regular.svg",
|
||||||
|
"Penetration Testing/Week 6/Lecture 6 - Threat Modelling.md",
|
||||||
|
"Pasted image 20241024094143.png",
|
||||||
|
"Pasted image 20241024094123.png",
|
||||||
|
"AI & Data Mining/Week 5/Tutorial 9 - PRISM.md",
|
||||||
"AI & Data Mining/Week 5/Lecture 9 - PRISM.md",
|
"AI & Data Mining/Week 5/Lecture 9 - PRISM.md",
|
||||||
"AI & Data Mining/Week 5",
|
"AI & Data Mining/Week 4/Workshop 4 - Nearest Neighbor.md",
|
||||||
|
"Networking and Security/Week 4/Workshop 4 - Routing.md",
|
||||||
"Penetration Testing/Week 4/Workshop 4 - Google Dorking.md",
|
"Penetration Testing/Week 4/Workshop 4 - Google Dorking.md",
|
||||||
"Penetration Testing/Week 4/Week 4 - Pre-Engagement.md",
|
"Penetration Testing/Week 4/Week 4 - Pre-Engagement.md",
|
||||||
"Penetration Testing/Week 3/Lecture 3 - Blue Team.md",
|
"Penetration Testing/Week 3/Lecture 3 - Blue Team.md",
|
||||||
"Penetration Testing/Week 5/Lecture 5 - Reconnaisance.md",
|
"Penetration Testing/Week 5/Lecture 5 - Reconnaisance.md",
|
||||||
"Client Server Systems/PHPStorm Repo/MVCtemplate-23-24/css",
|
|
||||||
"Client Server Systems/PHPStorm Repo/MVCtemplate-23-24/page1.php",
|
|
||||||
"Client Server Systems/PHPStorm Repo/MVCtemplate-23-24/page1.php.partial",
|
|
||||||
"Client Server Systems/PHPStorm Repo/MVCtemplate-23-24/phpinfo.php",
|
|
||||||
"Client Server Systems/PHPStorm Repo/MVCtemplate-23-24/phpinfo.php.partial",
|
|
||||||
"Client Server Systems/PHPStorm Repo/MVCtemplate-23-24/Models",
|
|
||||||
"Client Server Systems/PHPStorm Repo/MVCtemplate-23-24/js",
|
|
||||||
"Client Server Systems/PHPStorm Repo/MVCtemplate-23-24/index.php",
|
|
||||||
"Client Server Systems/PHPStorm Repo/MVCtemplate-23-24/index.php.partial",
|
|
||||||
"Data Structures/Week 5/Lecture 9 - Stacks.md",
|
"Data Structures/Week 5/Lecture 9 - Stacks.md",
|
||||||
"Client Server Systems/PHPStorm Repo/workshop5/images/new_uos_logo.jpg",
|
|
||||||
"Client Server Systems/PHPStorm Repo/workshop5/fonts/glyphicons-halflings-regular.svg",
|
|
||||||
"Client Server Systems/PHPStorm Repo/workshop4/images/new_uos_logo.jpg",
|
|
||||||
"Client Server Systems/PHPStorm Repo/workshop4/fonts/glyphicons-halflings-regular.svg",
|
|
||||||
"Client Server Systems/PHPStorm Repo/README.md",
|
"Client Server Systems/PHPStorm Repo/README.md",
|
||||||
"PHPStorm/README.md",
|
"PHPStorm/README.md",
|
||||||
"Software Project with Agile Techinques/Week 3/Study Skills - Class Diagrams.md",
|
"Software Project with Agile Techinques/Week 3/Study Skills - Class Diagrams.md",
|
||||||
"README.md",
|
"README.md",
|
||||||
"AI & Data Mining/Week 4/Tutorial 4 - Nearest Neighbor.md",
|
"AI & Data Mining/Week 4/Tutorial 4 - Nearest Neighbor.md",
|
||||||
"AI & Data Mining/Week 4/Lecture 7 - Nearest Neighbor.md",
|
"AI & Data Mining/Week 4/Lecture 7 - Nearest Neighbor.md",
|
||||||
"AI & Data Mining/Week 4/Workshop 4 - Nearest Neighbor.md",
|
|
||||||
"Penetration Testing/Week 3/Workshop 3 - netcat.md",
|
"Penetration Testing/Week 3/Workshop 3 - netcat.md",
|
||||||
"Software Project with Agile Techinques/Week 4/Workshop 4 - SPAT.md",
|
"Software Project with Agile Techinques/Week 4/Workshop 4 - SPAT.md",
|
||||||
"Networking and Security/Week 3/Workshop 3 - Subnetting.md",
|
|
||||||
"Networking and Security/Week 2/Lecture 3 - IP4 and Subnetting.md",
|
|
||||||
"Client Server Systems/Week 3/Workshop 3.md",
|
|
||||||
"Data Structures/Week 4/Week 4 - Exceptions.md",
|
|
||||||
"Networking and Security/Week 4/Lecture 8.md",
|
|
||||||
"AI & Data Mining/Week 3/Workshop 3.md",
|
|
||||||
"AI & Data Mining/Week 3/Tutorial 3.md",
|
|
||||||
"AI & Data Mining/Week 1/Lecture 2 - Input and Output.md",
|
|
||||||
"AI & Data Mining/Week 3/Lecture 5 - Naive Bayes.md",
|
|
||||||
"Database Systems/Untitled.canvas",
|
"Database Systems/Untitled.canvas",
|
||||||
"Untitled 1.canvas",
|
"Untitled 1.canvas",
|
||||||
"Untitled.canvas"
|
"Untitled.canvas"
|
||||||
|
20833
AI & Data Mining/Exercise Booklet.pdf
Normal file
63
AI & Data Mining/Week 5/Tutorial 9 - PRISM.md
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|

|
||||||
|
|
||||||
|
IF ? THEN risk = High
|
||||||
|
|
||||||
|
| Credit History | Debt | Collateral | Income | Risk |
|
||||||
|
| -------------- | ---- | ---------- | ------ | ---- |
|
||||||
|
| bad | high | none | 0-15k | high |
|
||||||
|
| unknown | high | none | 15-35k | high |
|
||||||
|
| unknown | low | none | 0-15k | high |
|
||||||
|
| bad | low | none | 0-15k | high |
|
||||||
|
| good | high | none | 0-15k | high |
|
||||||
|
| bad | high | none | 15-35k | high |
|
||||||
|
|
||||||
|
| Value Key Pair | $p/t$ |
|
||||||
|
| ------------------------ | ------- |
|
||||||
|
| credit history = bad | 3/4 |
|
||||||
|
| credit history = good | 1/5 |
|
||||||
|
| credit history = unknown | 2/5 |
|
||||||
|
| debt = high | 4/7 |
|
||||||
|
| debt = low | 2/7 |
|
||||||
|
| collateral = none | 6/11 |
|
||||||
|
| collateral = adequate | 0/3 |
|
||||||
|
| **income = 0k-15k** | **4/4** |
|
||||||
|
| income = 15k-35k | 2/4 |
|
||||||
|
| income = >35k | 0/6 |
|
||||||
|
|
||||||
|
IF Income = 0-15k THEN risk = high
|
||||||
|
|
||||||
|
| Credit History | Debt | Collateral | Income | Risk |
|
||||||
|
| -------------- | ---- | ---------- | ------ | ---- |
|
||||||
|
| bad | high | none | 0-15k | high |
|
||||||
|
| unknown | low | none | 0-15k | high |
|
||||||
|
| bad | low | none | 0-15k | high |
|
||||||
|
| good | high | none | 0-15k | high |
|
||||||
|
|
||||||
|
| Value Key Pair | $p/t$ |
|
||||||
|
| ------------------------ | ------- |
|
||||||
|
| credit history = bad | 3/6 |
|
||||||
|
| credit history = good | 1/4 |
|
||||||
|
| credit history = unknown | 1/4 |
|
||||||
|
| debt = high | 4/6 |
|
||||||
|
| debt = low | 2/4 |
|
||||||
|
| **collateral = none** | **6/6** |
|
||||||
|
IF Income = 0-15k AND collateral = none THEN risk = high
|
||||||
|
|
||||||
|
| Credit History | Debt | Collateral | Income | Risk |
|
||||||
|
| -------------- | ---- | ---------- | ------ | ---- |
|
||||||
|
| bad | high | none | 0-15k | high |
|
||||||
|
| unknown | low | none | 0-15k | high |
|
||||||
|
| bad | low | none | 0-15k | high |
|
||||||
|
| good | high | none | 0-15k | high |
|
||||||
|
| unknown | high | none | 15-35k | high |
|
||||||
|
| bad | high | none | 15-35k | high |
|
||||||
|
|
||||||
|
| Value Key Pair | $p/t$ |
|
||||||
|
| ------------------------ | ------- |
|
||||||
|
| credit history = bad | 2/4 |
|
||||||
|
| credit history = good | 1/4 |
|
||||||
|
| credit history = unknown | 1/4 |
|
||||||
|
| debt = high | 2/4 |
|
||||||
|
| debt = low | 2/4 |
|
||||||
|
|
||||||
|
|
81
AI & Data Mining/Week 6/Lecture 11 - ID3.md
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
# Logarithms
|
||||||
|
|
||||||
|
$log_2X$ used for generating decision trees
|
||||||
|
- Power to which we have to raise 2 to get X
|
||||||
|
- When using, X will be probability between 0 and 1
|
||||||
|
- log of probability is always negative
|
||||||
|
|
||||||
|
# Decision Tree for Contact Lenses
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
- Upside down
|
||||||
|
- Ellipse at top = root
|
||||||
|
- Edges = branches
|
||||||
|
- Rectangles = leaves
|
||||||
|
- Leaves assign classification
|
||||||
|
|
||||||
|
## Strategy
|
||||||
|
|
||||||
|
- Grow trees from root
|
||||||
|
- Top-Down
|
||||||
|
- More specific as grown, described as general-to-specific
|
||||||
|
- Divide and Conquer
|
||||||
|
- Stop if all examples have same class
|
||||||
|
- How is attribute or root node selected?
|
||||||
|
- Consider how to generate decision tree for weather dataset with nominal values only.
|
||||||
|
|
||||||
|
## Weather Dataset
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
### Criterion for Attribute Selection
|
||||||
|
|
||||||
|
- Which is best?
|
||||||
|
- Smallest tree
|
||||||
|
- Heuristic: choose attribute which produces purest nodes
|
||||||
|
- Information gain popular criteria for measuring impurity
|
||||||
|
- Increases with average purity of subsets
|
||||||
|
- Choose attribute that gives greatest information gain
|
||||||
|
|
||||||
|
# Information
|
||||||
|
|
||||||
|
- Expected amount of information needed to specify whether new example should be classified as yes or no, given it reached that node.
|
||||||
|
|
||||||
|
## Computing Information
|
||||||
|
|
||||||
|
- Measure information in bits
|
||||||
|
- Given probability distribution, info required to predict an event is the distributions entropy
|
||||||
|
- Entropy gives the information required in bits
|
||||||
|
|
||||||
|
# $I(p_1,p_2,...,p_n)=-p_{1}\log_{2}p_1 -p_{2}\log_{2}p_2 ... -p_{n}\log_{2}p_n$
|
||||||
|
Where n = number of classes, and $p_1 + p_2 + ... p_{n} = 1$
|
||||||
|
Minus signs included since output must be positive
|
||||||
|
|
||||||
|
### Expected Information for Outlook
|
||||||
|
|
||||||
|
- Outlook = Sunny
|
||||||
|
# $info([2,3]) = I(\frac{2}{5},\frac{3}{5}) = -\frac{2}{5}\log_2(\frac{2}{5}) - \frac{3}{5}\log_2(\frac{3}{5}) = 0.971 bits$
|
||||||
|
|
||||||
|
- Outlook = Overcast
|
||||||
|
# $info([4,0]) = I(\frac{4}{4},\frac{0}{4}) = -1\log_2(1) -0\log_2(0) = 0 bits$
|
||||||
|
|
||||||
|
- Outlook = Rainy
|
||||||
|
# $info([3,2]) = I(\frac{3}{5},\frac{2}{5}) = -\frac{3}{5}\log_2(\frac{3}{5}) - \frac{2}{5}\log_2(\frac{2}{5}) = 0.693 bits$
|
||||||
|
|
||||||
|
### Computing Information Gain
|
||||||
|
|
||||||
|
Information before splitting - information after splitting
|
||||||
|
|
||||||
|
gain(outlook) = info([9,5])-E(Outlook)
|
||||||
|
= 0.940 - 0.693
|
||||||
|
= 0.247
|
||||||
|
|
||||||
|
#### Information Gain for Attributes of Weather Data
|
||||||
|
|
||||||
|
gain(Outlook) = 0.247
|
||||||
|
gain(Temperature) = 0.029
|
||||||
|
gain(Humidity) = 0.152
|
||||||
|
gain(Windy) = 0.048
|
||||||
|
|
||||||
|
Outlook Selected for root because gains most information
|
@@ -0,0 +1,2 @@
|
|||||||
|

|
||||||
|
|
7
Data Structures/Week 7/Week 7.md
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
# Priority Queue
|
||||||
|
|
||||||
|
Next job to be selected is one with highest prio
|
||||||
|
|
||||||
|
Add / Insert new item
|
||||||
|
Remove / Delete highest or lowest prio
|
||||||
|
Get / find highest or lowest prio
|
BIN
Networking and Security/Week 6/workshop.pkt
Normal file
BIN
Pasted image 20241018131938.png
Normal file
After Width: | Height: | Size: 44 KiB |
BIN
Pasted image 20241024094123.png
Normal file
After Width: | Height: | Size: 99 KiB |
BIN
Pasted image 20241024094143.png
Normal file
After Width: | Height: | Size: 64 KiB |
BIN
Pasted image 20241024132411.png
Normal file
After Width: | Height: | Size: 30 KiB |
BIN
Pasted image 20241024132906.png
Normal file
After Width: | Height: | Size: 121 KiB |
BIN
Pasted image 20241025132339.png
Normal file
After Width: | Height: | Size: 44 KiB |
BIN
Pasted image 20241025141348.png
Normal file
After Width: | Height: | Size: 9.4 KiB |
BIN
Pasted image 20241025141715.png
Normal file
After Width: | Height: | Size: 10 KiB |
BIN
Pasted image 20241025143543.png
Normal file
After Width: | Height: | Size: 309 KiB |
110
Penetration Testing/Week 6/Lecture 6 - Threat Modelling.md
Normal file
@@ -0,0 +1,110 @@
|
|||||||
|
Identifying vulnerabilities leading to compromise, or mission objectives, identifying business risk with and attack.
|
||||||
|
|
||||||
|
Identify attack surface presented to outside actors, bigger surface, bigger risk. Create clear scenarios relevant to organisation.
|
||||||
|
Provides clarity to risk appetite and prioritisation.
|
||||||
|
- Importance of assets
|
||||||
|
- Threat community relevance
|
||||||
|
Emulates tools, techniques, capabilities, accessibility and general profile of attacker
|
||||||
|
- Focus on most relevant controls, processes and infra rather than inventory list of IT elements.
|
||||||
|
**White Box**: Threat model should be constructed in coordination with organisation
|
||||||
|
**Black Box**: Tester creates threat model based on attackers view, using OSINT related to organisation.
|
||||||
|
|
||||||
|
# Components
|
||||||
|
|
||||||
|
- Understand Assets
|
||||||
|
- Business Asset Analysis: What systems to target
|
||||||
|
- Business Process Analysis: How to attack systems
|
||||||
|
- Understand Attacker (Community/Agent)
|
||||||
|
- Attacker Analysis
|
||||||
|
- Attacker Capability Analysis
|
||||||
|
- Motivation Modelling
|
||||||
|
- Value of assets available at target, cost of acquiring
|
||||||
|
- Profit, grudge, fun, further access to parner / connected systems
|
||||||
|
- Impact Modelling
|
||||||
|
- What if scenarios surrounding loss event for each identified asset
|
||||||
|
- Asset's net value, intrinsic value, other indirect costs associated with loss
|
||||||
|
|
||||||
|
## Business Asset Analysis
|
||||||
|
|
||||||
|
- Identify Assets and Business Processes
|
||||||
|
- Most likely targets, value and impact of loss
|
||||||
|
- Organisational Assets
|
||||||
|
- Internal policies, plans and procedures identify key roles and critical business practices that keep company running.
|
||||||
|
- Product information, trade secrets, plans, source code, marketing information
|
||||||
|
- Financial information
|
||||||
|
- Technical information, design and configuration, account information, credentials, ISMS
|
||||||
|
- Employee, customer, partner, supplier data
|
||||||
|
- Human Assets
|
||||||
|
- Decision makers
|
||||||
|
|
||||||
|
# Business Process Analysis
|
||||||
|
|
||||||
|
- Business processes and assets supporting them form value chains
|
||||||
|
- Mapping processes, identifying critical and non-critical processes, understand how business works, can assign weight and identify impact of specific threat scenarios
|
||||||
|
- Technical infrastructure, information assets, human assets, 3rd party integration
|
||||||
|
|
||||||
|
# Threat Agents / Community Analysis
|
||||||
|
|
||||||
|
- Internal Threats
|
||||||
|
- Employees
|
||||||
|
- Management, Administrators, Developers, Engineers, Technicians
|
||||||
|
- Contractors
|
||||||
|
- General user community
|
||||||
|
- Remote support
|
||||||
|
- External Threats
|
||||||
|
- Ex-employees
|
||||||
|
- Business partners
|
||||||
|
- Competitors
|
||||||
|
- Contractors
|
||||||
|
- Technical, outsourcing (ex. Cloud Providers), support, guards, cleaners
|
||||||
|
- Both internal and external
|
||||||
|
- Suppliers
|
||||||
|
- Nation States, Organised Crime, Hacktivists, Skids
|
||||||
|
- Differing Capabilities and motivations
|
||||||
|
- Map threat communities against primary and secondary assets
|
||||||
|
|
||||||
|
## Attacker Capability Analysis
|
||||||
|
|
||||||
|
- Analysis of tools
|
||||||
|
- Tools known to be available to community / agent included here. Skill level?
|
||||||
|
- Availability of exploits / payloads
|
||||||
|
- Exploits readily available (public dbs, frameworks, underground communities)
|
||||||
|
- Threat agent capable of customising exploits or developing new ones
|
||||||
|
- Communication mechanisms
|
||||||
|
- Evaluate complexity of attacks against organisation
|
||||||
|
- Types of threats can exist post-exploit
|
||||||
|
- Exfiltration channels or C2 (command and control) channels
|
||||||
|
- Bulletproof Hosting
|
||||||
|
- Botnets
|
||||||
|
- Drop boxes, ex rPi designed to be connected to network to facilitate ongoing breach
|
||||||
|
- Accessibility
|
||||||
|
|
||||||
|
## Summary of Methods
|
||||||
|
|
||||||
|
- Attacker-Centric
|
||||||
|
- Start from attacker, evaluate goals, how achieved through attack tree. Starts from entry points or attacker actions
|
||||||
|
- System-Centric
|
||||||
|
- Starts from model of system, attempts to follow model dynamics and logic. Look for types of attacks against each element of model. Approach is used for ex. Microsoft's Security Development Lifecycle
|
||||||
|
- Asset-Centric
|
||||||
|
- Starts from assets entrusted to system, such as collection of personal information, attempts to identify how security breaches of CIA properties can happen
|
||||||
|
|
||||||
|
### Attacker-Centric Example
|
||||||
|
|
||||||
|
```mermaid
|
||||||
|
flowchart TD
|
||||||
|
toac[/Theft of Auth Cookies\] --- o[OR]
|
||||||
|
o --- and[and]
|
||||||
|
o --- and2[and]
|
||||||
|
and --- uc[/Unencrypted Connection\]
|
||||||
|
and --- ed[/Eavesdropping\]
|
||||||
|
and2 --- css[/Cross-Site Scripting\]
|
||||||
|
and2 --- xss[/XSS Vulnerability\]
|
||||||
|
```
|
||||||
|
|
||||||
|
### System-Centric Example
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
### Asset-Centric Example
|
||||||
|
|
||||||
|

|
4
Penetration Testing/Week 6/Workshop 6.md
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|

|
||||||
|

|
||||||
|
|
||||||
|

|
1
Penetration Testing/Week 6/dns-exfil-infil
Submodule
@@ -0,0 +1,104 @@
|
|||||||
|
# Context
|
||||||
|
|
||||||
|
The aim of this assignment is to perform requirements analysis modelling for a software solution using the Unified Modelling Language (UML).
|
||||||
|
|
||||||
|
You are presented with a business scenario where a software solution is sought to help provide services to users and allow future expansion. You are expected to use materials provided to you in the lecture series in the course plus information obtained from external sources for doing this assignment.
|
||||||
|
|
||||||
|
# Scenario
|
||||||
|
|
||||||
|
A combined cycle gas turbine power station requires a web-based system to manage the storage and installation of spare parts and the acquisition of new parts from the Central Storage Warehouse (the CSW). The power station maintains an inventory of all the parts it owns comprising: part name, description and specification. There are many copies of some parts – each part has a unique ID, known as an asset tag number. The asset tag number is used when there is damage to particular parts. The power station also keeps a catalogue of all the possible spare parts types used.
|
||||||
|
|
||||||
|
Only registered *maintenance engineers* and *team leaders* are allowed to install and repair parts on the plant. *Maintenance engineers* and *team leaders* can use the parts catalogue to search for part types and can also search the parts inventory. *Maintenance engineers* work in teams, currently: electrical, mechanical and environmental. Each `team` has its own team lead. ``However, the system needs to be flexible enough to allow creation of new teams in the future.``
|
||||||
|
|
||||||
|
*Maintenance engineers* are allowed to take spare parts from the CSW, `up to a value of £50,000`. Higher value items need **authorisation** from a *team leader*. Spare parts are issued from the CSW by a *Store Manager*.
|
||||||
|
|
||||||
|
Occasionally a *maintenance engineer* needs to **sign parts** back into the CSW. Such “returns” maybe because time has run out on the shift to install the part or because the part is no longer required.
|
||||||
|
|
||||||
|
`Whenever a new part is installed in the power station an old part is removed`. The old part must either be returned to the CSW for **refurbishment** or **disposed of as scrap**.
|
||||||
|
|
||||||
|
After *store managers(sec)* receive **requisitions** from team leaders, they **produce purchase orders** to purchase spare parts from suppliers. The purchase orders contain part names and . *Suppliers* then **send the spare parts** along with an **invoice** to the CSW. The *store managers* then **reconcile the invoices** against the purchase orders to **authorise payments** for *suppliers*.
|
||||||
|
|
||||||
|
The *store managers* also handle **spare parts returned to *suppliers* for refurbishment**. When a spare part is returned to the CSW, the *store managers* produce a **purchase order**. Again, *suppliers* s**end refurbished goods (spare parts) to the** CSW, where the *store managers* then **reconcile invoices** and **authorise payments**.
|
||||||
|
|
||||||
|
After the *store managers* **authorise payments** for *suppliers*, the payment transactions are actually implemented by the *power station financial management system* (FMS). A message passing interface is used to payment transactions. Each payment transaction must include: supplier name, address, phone number, email address, invoice number, order number, authorising store manager name and payment amount (in GBP).
|
||||||
|
|
||||||
|
# Task
|
||||||
|
|
||||||
|
Your task is to:
|
||||||
|
|
||||||
|
- Produce a Use Case Model of the system. Your use case model should describe the users’ view of interaction scenarios with the system and should include the following:
|
||||||
|
- Read the scenario in order to identify and name the actors of the system.
|
||||||
|
- For each actor you have found in the system, identify and name the use cases for the actor.
|
||||||
|
- Use straight lines to show actor and use case relationships.
|
||||||
|
- Indicate primary and secondary actors.
|
||||||
|
- Write textual use cases for TWO of the use cases you have identified. The use cases must include
|
||||||
|
- Use Case Title
|
||||||
|
- Primary Actor
|
||||||
|
- Goal
|
||||||
|
- Scope
|
||||||
|
- Preconditions
|
||||||
|
- Postconditions
|
||||||
|
- Main Success Scenario
|
||||||
|
- Extensions
|
||||||
|
- Draw a simple, high-level, UML class diagram of the system.
|
||||||
|
- Use the class diagram illustrate various relationships between classes, such as inheritance, association and aggregation.
|
||||||
|
- Show example method and attribute names in classes, (think about encapsulation, make sure methods go with the attributes encapsulated by the class)
|
||||||
|
- Try to include method call and return parameters, where appropriate.
|
||||||
|
|
||||||
|
# Report Format
|
||||||
|
|
||||||
|
Your report should include the following:
|
||||||
|
|
||||||
|
- Front Sheet – your full name, your student ID, your User name, date, the assessment title, the name of the module and its CRN.
|
||||||
|
- Use case diagram.
|
||||||
|
- Two textual use cases.
|
||||||
|
- Simple system class diagram.
|
||||||
|
- References – the sources used in your report (and cite them in the body of your report). You must use the APA 7th Ed (Harvard) style.
|
||||||
|
|
||||||
|
Your submission should be typed (rather than hand-written) in, at least, font size 12pt. Do not use colour for emphasis because your submission will be printed in black and white.
|
||||||
|
|
||||||
|
# Actors
|
||||||
|
|
||||||
|
## Maintenance Engineers
|
||||||
|
|
||||||
|
### Actions
|
||||||
|
|
||||||
|
Install Parts
|
||||||
|
Repair Parts
|
||||||
|
Search Part Type
|
||||||
|
Search Part Inventory
|
||||||
|
Sign Parts Out of CSW
|
||||||
|
Sign Parts Into CSW
|
||||||
|
|
||||||
|
## Team Leaders
|
||||||
|
|
||||||
|
### Actions
|
||||||
|
|
||||||
|
Install Parts
|
||||||
|
Repair Parts
|
||||||
|
Search Part Type
|
||||||
|
Search Part Inventory
|
||||||
|
Authorise High Value to Engineers
|
||||||
|
Send Requisition to Store Manager
|
||||||
|
|
||||||
|
## Store Managers
|
||||||
|
|
||||||
|
### Actions
|
||||||
|
|
||||||
|
Produce Purchase Order from Requisition (+Refurb)
|
||||||
|
Reconcile Invoices (+Refurb)
|
||||||
|
Authorise Supplier Payment (+Refurb)
|
||||||
|
Send Parts to Suppliers for refurbishment
|
||||||
|
|
||||||
|
## Suppliers
|
||||||
|
|
||||||
|
### Actions
|
||||||
|
|
||||||
|
Send Spare parts to CSW (+ Refurbs) **<-**
|
||||||
|
Send Invoice to CSW (+Refurbs)
|
||||||
|
|
||||||
|
## Financial Management System
|
||||||
|
|
||||||
|
### Actions
|
||||||
|
|
||||||
|
Process Transaction
|