vault backup: 2024-10-17 23:28:49
59
.obsidian/workspace.json
vendored
@@ -21,7 +21,7 @@
|
||||
"state": {
|
||||
"type": "markdown",
|
||||
"state": {
|
||||
"file": "Data Structures/Week 5/Lecture 9 - Stacks.md",
|
||||
"file": "AI & Data Mining/Week 5/Lecture 9 - PRISM.md",
|
||||
"mode": "source",
|
||||
"source": false
|
||||
}
|
||||
@@ -79,7 +79,8 @@
|
||||
}
|
||||
],
|
||||
"direction": "horizontal",
|
||||
"width": 395.5
|
||||
"width": 395.5,
|
||||
"collapsed": true
|
||||
},
|
||||
"right": {
|
||||
"id": "ee8f6df41634f71e",
|
||||
@@ -95,7 +96,7 @@
|
||||
"state": {
|
||||
"type": "backlink",
|
||||
"state": {
|
||||
"file": "Data Structures/Week 5/Lecture 9 - Stacks.md",
|
||||
"file": "AI & Data Mining/Week 5/Lecture 9 - PRISM.md",
|
||||
"collapseAll": false,
|
||||
"extraContext": false,
|
||||
"sortOrder": "alphabetical",
|
||||
@@ -112,7 +113,7 @@
|
||||
"state": {
|
||||
"type": "outgoing-link",
|
||||
"state": {
|
||||
"file": "Data Structures/Week 5/Lecture 9 - Stacks.md",
|
||||
"file": "AI & Data Mining/Week 5/Lecture 9 - PRISM.md",
|
||||
"linksCollapsed": false,
|
||||
"unlinkedCollapsed": true
|
||||
}
|
||||
@@ -135,7 +136,7 @@
|
||||
"state": {
|
||||
"type": "outline",
|
||||
"state": {
|
||||
"file": "Data Structures/Week 5/Lecture 9 - Stacks.md"
|
||||
"file": "AI & Data Mining/Week 5/Lecture 9 - PRISM.md"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -187,40 +188,43 @@
|
||||
},
|
||||
"active": "3ed058b7ba32ddc0",
|
||||
"lastOpenFiles": [
|
||||
"Client Server Systems/PHPStorm Repo/workshop4/Views/index.phtml~",
|
||||
"Client Server Systems/PHPStorm Repo/workshop5/calculator.php~",
|
||||
"Client Server Systems/PHPStorm Repo/workshop5/calculator.php",
|
||||
"Client Server Systems/PHPStorm Repo/workshop5/index.php~",
|
||||
"Client Server Systems/PHPStorm Repo/workshop5/Views/template/header.phtml",
|
||||
"Client Server Systems/PHPStorm Repo/workshop5/Views/template/footer.phtml",
|
||||
"Client Server Systems/PHPStorm Repo/workshop5/js/bootstrap.min.js",
|
||||
"Client Server Systems/PHPStorm Repo/workshop5/js/bootstrap.js",
|
||||
"Pasted image 20241017132059.png",
|
||||
"Pasted image 20241017132019.png",
|
||||
"Pasted image 20241017131912.png",
|
||||
"Pasted image 20241017131740.png",
|
||||
"Pasted image 20241017131525.png",
|
||||
"Pasted image 20241017131053.png",
|
||||
"Pasted image 20241017130933.png",
|
||||
"Networking and Security/Week 4/Workshop 4 - Routing.md",
|
||||
"AI & Data Mining/Week 5/Lecture 9 - PRISM.md",
|
||||
"AI & Data Mining/Week 5",
|
||||
"Penetration Testing/Week 4/Workshop 4 - Google Dorking.md",
|
||||
"Penetration Testing/Week 4/Week 4 - Pre-Engagement.md",
|
||||
"Penetration Testing/Week 3/Lecture 3 - Blue Team.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",
|
||||
"Client Server Systems/PHPStorm Repo/workshop5/images/new_uos_logo.jpg",
|
||||
"Client Server Systems/PHPStorm Repo/workshop5/fonts/glyphicons-halflings-regular.woff",
|
||||
"Client Server Systems/PHPStorm Repo/workshop5/fonts/glyphicons-halflings-regular.ttf",
|
||||
"Client Server Systems/PHPStorm Repo/workshop5/fonts/glyphicons-halflings-regular.svg",
|
||||
"Client Server Systems/PHPStorm Repo/workshop5/fonts/glyphicons-halflings-regular.eot",
|
||||
"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/workshop 5/images/new_uos_logo.jpg",
|
||||
"Client Server Systems/PHPStorm Repo/workshop 5/fonts/glyphicons-halflings-regular.svg",
|
||||
"Client Server Systems/PHPStorm Repo/MVCtemplate-24-with-top-navbar/images/new_uos_logo.jpg",
|
||||
"Client Server Systems/PHPStorm Repo/MVCtemplate-24-with-top-navbar/fonts/glyphicons-halflings-regular.svg",
|
||||
"Client Server Systems/PHPStorm Repo/MVCtemplate-23-24/images/new_uos_logo.jpg",
|
||||
"Client Server Systems/PHPStorm Repo/MVCtemplate-23-24/fonts/glyphicons-halflings-regular.svg",
|
||||
"Client Server Systems/PHPStorm Repo/README.md",
|
||||
"PHPStorm/README.md",
|
||||
"Software Project with Agile Techinques/Week 3/Study Skills - Class Diagrams.md",
|
||||
"Data Structures/Week 5/Lecture 9 - Stacks.md",
|
||||
"README.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/Workshop 4 - Nearest Neighbor.md",
|
||||
"Penetration Testing/Week 3/Workshop 3 - netcat.md",
|
||||
"Penetration Testing/Week 4/Week 4 - Pre-Engagement.md",
|
||||
"Penetration Testing/Week 4/Workshop 4 - Google Dorking.md",
|
||||
"Software Project with Agile Techinques/Week 4/Workshop 4 - SPAT.md",
|
||||
"Networking and Security/Week 4/Workshop 4 - Routing.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",
|
||||
@@ -230,9 +234,6 @@
|
||||
"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",
|
||||
"Data Structures/Week 1/Lecture 2 - Data Structures & ADTs.md",
|
||||
"Data Structures/Week 1/Lecture 1 - Module Intro.md",
|
||||
"Penetration Testing/Week 3/Lecture 3 - Blue Team.md",
|
||||
"Database Systems/Untitled.canvas",
|
||||
"Untitled 1.canvas",
|
||||
"Untitled.canvas"
|
||||
|
95
AI & Data Mining/Week 5/Lecture 9 - PRISM.md
Normal file
@@ -0,0 +1,95 @@
|
||||
# Covering Algorithms
|
||||
|
||||
- Each class in turn; find set of rules covering all examples
|
||||
- At each stage, rule is identified that covers some examples
|
||||
- Example is covered if satisfying conditions in the antecedent (LHS) of the rule
|
||||
- Consider dataset with 2 predicting numeric attributes, and two class values.
|
||||
- 
|
||||
|
||||
# PRISM: Simple Covering Algorithm
|
||||
|
||||
- Generates rule by adding tests that maximise probability of desired class
|
||||
- Similar to situation in decision trees; problem of selecting attribute to split on
|
||||
- Each new test reduces rules coverage
|
||||
- Rule becomes more specific as tests are added
|
||||
- Search strategy is general-to-specific
|
||||
- 
|
||||
|
||||
## Selecting a Test
|
||||
|
||||
Goal: Maximise probability of desired class
|
||||
- $t$ = total number of examples covered by rule
|
||||
- $p$ = number of positive examples of the class covered by rule
|
||||
- $t - p$ = number of errors made by rule
|
||||
- => Select test that maximises ratio $p/t$
|
||||
Stop Condition: $t-p=0$
|
||||
- $p = t$, $p/t=1$
|
||||
- Or, set of examples cannot be split further.
|
||||
|
||||
## Example: Contact Lenses Dataset | Class = Hard
|
||||
|
||||
### Selecting 1st Test of 1st Rule
|
||||
|
||||
- Rule to Seek: If ? { then recommendation = Hard }
|
||||

|
||||
|
||||
#### Modified Rule and Coverage
|
||||
|
||||
- Rule with best test added: If astigmatism = Yes { then recommendation = Hard }
|
||||

|
||||
|
||||
### Selecting 2nd Test of 1st Rule
|
||||
|
||||
- If astigmatism = Yes and ? { then recommendation = Hard }
|
||||
|
||||

|
||||
|
||||
#### Modified Rule and its Coverage
|
||||
|
||||
- Rule with best test added: If astigmatism = Yes and tear rate = Normal { then recommendation = Hard }
|
||||

|
||||
|
||||
### Selecting 3rd Test of 1st Rule
|
||||
|
||||
- If astigmatism = Yes and tear rate = Normal and ? { then recommendation = Hard }
|
||||

|
||||
- PRISM will use test with highest sample size, therefore using Myope.
|
||||
|
||||
### 1st Rule for Class = Hard
|
||||
|
||||
- Final Rule:
|
||||
If astigmatism = Yes
|
||||
and tear rate = Normal
|
||||
and spectacle prescription = Myope
|
||||
then recommendation = Hard
|
||||
|
||||
$p/t = 3/3 = 1$
|
||||
|
||||
# Pseudo-code for PRISM
|
||||
|
||||
For each class C
|
||||
Init E to set of training examples
|
||||
While E contains examples in class C
|
||||
Create rule R with empty LHS predicting class C
|
||||
Until p/t=1, do
|
||||
For each attribute A not mentioned in R, and each value v
|
||||
Consider adding condition A=v to LHS of R
|
||||
Select A and v to maximise p/t
|
||||
Break Ties by choosing largest sample
|
||||
Add A=v to R
|
||||
Remove examples covered by R from E
|
||||
|
||||
# Separate and Conquer
|
||||
|
||||
- PRISM with outer loop removed generates list of rules for one class
|
||||
- PRISM with outer loop removed is separate and conquer algorithm
|
||||
- Identify useful rule
|
||||
- Separate examples covered
|
||||
- Conquer remaining examples
|
||||
|
||||
# Rule Execution
|
||||
|
||||
- Default Rule
|
||||
- If no rules cover example, prediction is the majority class (most frequent in training data)
|
||||
- Conflict Resolution Strategy
|
||||
- If more than one rule covers an example, select predicted class with highest recurrance in training data
|
BIN
Pasted image 20241017130933.png
Normal file
After Width: | Height: | Size: 71 KiB |
BIN
Pasted image 20241017131053.png
Normal file
After Width: | Height: | Size: 38 KiB |
BIN
Pasted image 20241017131525.png
Normal file
After Width: | Height: | Size: 59 KiB |
BIN
Pasted image 20241017131740.png
Normal file
After Width: | Height: | Size: 90 KiB |
BIN
Pasted image 20241017131912.png
Normal file
After Width: | Height: | Size: 43 KiB |
BIN
Pasted image 20241017132019.png
Normal file
After Width: | Height: | Size: 50 KiB |
BIN
Pasted image 20241017132059.png
Normal file
After Width: | Height: | Size: 36 KiB |
107
Penetration Testing/Week 5/Lecture 5 - Reconnaisance.md
Normal file
@@ -0,0 +1,107 @@
|
||||
# Intelligence Gathering
|
||||
- More information gathered, more vectors of attack may be able to use
|
||||
- Better knowledge of target, more likely to succeed
|
||||
- Better target company knows what is common knowledge, better it can prepare.
|
||||
|
||||
## Open-source Intelligence (OSINT)
|
||||
|
||||
- Gathers information from publicly available sources and analyses it, producing intelligence
|
||||
- May not be up to date, accurate or complete.
|
||||
- Could be deliberately manipulated to provide false intelligence.
|
||||
- Many companies may fail to take into account public information, and how it could be gathered, organised and made searchable
|
||||
- Physical (locations / relationships)
|
||||
- Logical (business partners, job openings, meeting minutes, professional licenses)
|
||||
- Org chart (important people)
|
||||
- Electronic (document metadata, marketing information)
|
||||
- Infrastructure (email addresses, technologies used)
|
||||
- Many employees fail to realise information published on the public domain about themselves.
|
||||
- Social Media
|
||||
- GDPR gives right to ask to remove.
|
||||
|
||||
# Limits
|
||||
|
||||
- Gathering information to identify entry points
|
||||
- physical, electronic, human...
|
||||
- and try to map out internal structure
|
||||
- physical, network, organisational
|
||||
- and external dependencies
|
||||
- outsourcing, financial
|
||||
- It does not involve trying to test or use entry points
|
||||
- "potential vulnerability" more interesting
|
||||
- cyclic lifecycle, we can do more recon later
|
||||
|
||||
# Levels
|
||||
|
||||
- Level 1
|
||||
- Automated tools to gather information
|
||||
- Generally a simple list of what exists
|
||||
- Level 2
|
||||
- Combination of tools and manual searching / analysis
|
||||
- Good understanding of physical locations, business relationships, organisation charts, naming policies, etc.
|
||||
- Level 3
|
||||
- Heavy use of manual techniques
|
||||
- Deep understanding of business and how it operates
|
||||
- Highly strategic and planned, time consuming
|
||||
|
||||
# Considerations in Commercial Pentest
|
||||
|
||||
- Keep to RoE
|
||||
- Avoid legal issues and avoid scope creep
|
||||
- Avoid being sidetracked by interesting sideroads
|
||||
- Have a Goal
|
||||
- What is relevant to the target you have been engaged to attack
|
||||
- Have a deadline
|
||||
- Make sure time allocated to use intelligence
|
||||
|
||||
# Passive vs Active Reconnaissance
|
||||
|
||||
## Passive
|
||||
|
||||
- Collecting data using publicly available information without direct contact with target
|
||||
- Open web resources, public company information
|
||||
- How they operate, how large they are, contact info, etc.
|
||||
|
||||
## Active
|
||||
|
||||
- Direct interaction with target by any means to gather information
|
||||
- Port scanning, vulnerability scanning, etc
|
||||
- Illegal without permission.
|
||||
|
||||
## Semi-Passive
|
||||
|
||||
- Collecting data with methods that appear like normal internet traffic and behaviour.
|
||||
- Looking at metadata in published documents and files. Not actively seeking hidden content.
|
||||
|
||||
# Semester 1 Assignment
|
||||
|
||||
- Choose company
|
||||
- Should be small, but not too small
|
||||
- Likely IT business
|
||||
- Passive recon using OSINT sources
|
||||
- Include some semi-passive recon
|
||||
- Write report, outlining what has been found and why company should be aware.
|
||||
|
||||
- Look for:
|
||||
- Corporate
|
||||
- Personal
|
||||
- Technical information
|
||||
- http://www.pentest-standard.org/index.php/Intelligence_Gathering
|
||||
|
||||
## How to Obtain Information
|
||||
|
||||
- Google Dorking, search for information to see who else has it, and what else they have.
|
||||
- Information Gathering tools built into Kali
|
||||
- Google for OSINT sources.
|
||||
- Google Hacking Database (GHDB)
|
||||
- Maltego
|
||||
- DMitry
|
||||
- Dnmap
|
||||
- Ike-scan (Discover IPsec VPNs)
|
||||
- P0f (Passive traffic fingerprinting)
|
||||
|
||||
### Note on Packet Sniffing
|
||||
|
||||
- Some tools rely on network inspection between you and target
|
||||
- "Active Packet Sniffing" means specific things cause traffic to flow to you
|
||||
- "Passive Packet Sniffing" means you inspect the traffic that happens to come past sniffer.
|
||||
-
|