From 828d37e0c88450e9c4ce6dfb858e317e4f816e28 Mon Sep 17 00:00:00 2001 From: George Wilkinson Date: Thu, 30 Jan 2025 17:33:17 +0000 Subject: [PATCH] vault backup: 2025-01-30 17:33:17 --- .DS_Store | Bin 18436 -> 18436 bytes .obsidian/appearance.json | 10 +- .obsidian/workspace.json | 32 +- .../Week 20 - Intro to Propositional Logic.md | 126 +++++ Networking and Security/.DS_Store | Bin 6148 -> 8196 bytes .../Week 20/hashcat-exercise-files.zip | Bin 0 -> 11430 bytes .../hashcat-exercise/50-crack-these-please | 50 ++ .../hashcat-exercise/500_passwords.txt | 500 ++++++++++++++++++ .../hashcat-exercise/crack-these-please-md5 | 50 ++ .../crack-these-please-sha256 | 50 ++ .../crack-these-please-sha512 | 50 ++ .../Week 20/hashcat-exercise/test-dict | 3 + .../hashcat-exercise/view-sample-password.sh | 77 +++ Penetration Testing/.DS_Store | Bin 6148 -> 6148 bytes ...Testing Assignment 1 Stage 1 00677611.docx | Bin ... Testing Assignment 1 Stage 1 00677611.odt | Bin ...Testing Assignment 1 Stage 3 00677611.docx | Bin ... Testing Assignment 1 Stage 3 00677611.odt | Bin ... Testing Assignment 1 Stage 3 00677611.pdf | Bin .../Stage 1 - RoE.md | 0 .../emails.txt | 0 .../Week 20/Week 20 - Web Attacks.md | 117 ++-- 22 files changed, 1003 insertions(+), 62 deletions(-) create mode 100644 AI & Data Mining/Week 20/Week 20 - Intro to Propositional Logic.md create mode 100644 Networking and Security/Week 20/hashcat-exercise-files.zip create mode 100644 Networking and Security/Week 20/hashcat-exercise/50-crack-these-please create mode 100644 Networking and Security/Week 20/hashcat-exercise/500_passwords.txt create mode 100644 Networking and Security/Week 20/hashcat-exercise/crack-these-please-md5 create mode 100644 Networking and Security/Week 20/hashcat-exercise/crack-these-please-sha256 create mode 100644 Networking and Security/Week 20/hashcat-exercise/crack-these-please-sha512 create mode 100644 Networking and Security/Week 20/hashcat-exercise/test-dict create mode 100755 Networking and Security/Week 20/hashcat-exercise/view-sample-password.sh rename Penetration Testing/{Assessment => Reconnaissance Assignment}/Penetration Testing Assignment 1 Stage 1 00677611.docx (100%) rename Penetration Testing/{Assessment => Reconnaissance Assignment}/Penetration Testing Assignment 1 Stage 1 00677611.odt (100%) rename Penetration Testing/{Assessment => Reconnaissance Assignment}/Penetration Testing Assignment 1 Stage 3 00677611.docx (100%) rename Penetration Testing/{Assessment => Reconnaissance Assignment}/Penetration Testing Assignment 1 Stage 3 00677611.odt (100%) rename Penetration Testing/{Assessment => Reconnaissance Assignment}/Penetration Testing Assignment 1 Stage 3 00677611.pdf (100%) rename Penetration Testing/{Assessment => Reconnaissance Assignment}/Stage 1 - RoE.md (100%) rename Penetration Testing/{Assessment => Reconnaissance Assignment}/emails.txt (100%) diff --git a/.DS_Store b/.DS_Store index d3f7d0634e70cc77a8393431a61cd8d360c41a30..7a5f71da5b6948cc94c1d629ac859cb59b0de7d8 100644 GIT binary patch delta 452 zcmbV`ze_?<6vxj=pHI-hB1*{MMcFgd=k;07hM>SKYALL6_E!-+eWVdM1O~P=DF<2| zD+n6yf6&?xQA=ZUgPSx}R}+WEE`0Aj9KQGS{ni^;Z(w5^tIeGcn$`?DMvdBW2b~!q zdd7fD2OU^X8Xp6~vr_ zDqZ^hlM@54-uI><17#?JLQB566x{s=h)4kMz#QwF*L&p@I1mA4vD*`O2J#|86No>B z;l5j#zxp4LzGiB+_yVKz*)?jb5xP>}yRZ9nw_Gx<(xFI0V)HS69Y{&^6j^T8yyRj! fztFaj9+^%_3{jC8Jjo=-e{f@5UhUYq8k2254D)~M delta 250 zcmZpfz}PZ@ae_Z%>BNB7lh+%XO)g~Ao6Il7HhH_C&g6r}TAYRqW(-CQrVM(U1)09F zPHf=a%+A5W!KgafK}dV@dO?oOqC!8oH`~gcW8AF3#Ky#Ev6)Aqn3bD@!I>c(h!q$N zCofY~MdBMx_K}mA%%jG;Ia6&r<76?-hm%!xwKm6VMX*lJHPD!B&1eRs^)}lYcri}i zu5UA$+rVhEun{lYWG^%Q$qN|`CT9y6ZMGM1Wt_Y~GaRp8i_Po~-&i(ZHuGgf)2zt| E0DRO)9smFU diff --git a/.obsidian/appearance.json b/.obsidian/appearance.json index 60dd0a4..3d81c7f 100755 --- a/.obsidian/appearance.json +++ b/.obsidian/appearance.json @@ -3,8 +3,10 @@ "theme": "system", "cssTheme": "Tokyo Night", "nativeMenus": true, - "baseFontSize": 16, - "interfaceFontFamily": "AppleGothic,Apple SD Gothic Neo,Apple LiGothic", - "textFontFamily": "AppleGothic", - "monospaceFontFamily": "PT Mono" + "baseFontSize": 14, + "interfaceFontFamily": "AppleGothic,Inter", + "textFontFamily": "AppleGothic,Inter", + "monospaceFontFamily": "PT Mono,Andale Mono", + "baseFontSizeAction": false, + "translucency": true } \ No newline at end of file diff --git a/.obsidian/workspace.json b/.obsidian/workspace.json index 0f8ea3e..4df63b5 100755 --- a/.obsidian/workspace.json +++ b/.obsidian/workspace.json @@ -13,12 +13,12 @@ "state": { "type": "markdown", "state": { - "file": "Penetration Testing/Week 20/Week 20 - Web Attacks.md", + "file": "AI & Data Mining/Week 20/Week 20 - Intro to Propositional Logic.md", "mode": "source", "source": false }, "icon": "lucide-file", - "title": "Week 20 - Web Attacks" + "title": "Week 20 - Intro to Propositional Logic" } } ] @@ -200,9 +200,21 @@ }, "active": "87fc52db0e53c854", "lastOpenFiles": [ - "CWC 3 - Fit for Trade.md", + "AI & Data Mining/Week 20/Propositional Logic Examples.md", + "AI & Data Mining/Week 20/Week 20 - Intro to Propositional Logic.md", + "Networking and Security/Week 20/hashcat-exercise/test-dict", + "Networking and Security/Week 20/hashcat-exercise/view-sample-password.sh", + "Networking and Security/Week 20/hashcat-exercise/crack-these-please-sha512", + "Networking and Security/Week 20/hashcat-exercise/crack-these-please-sha256", + "Networking and Security/Week 20/hashcat-exercise/crack-these-please-md5", + "Networking and Security/Week 20/hashcat-exercise/500_passwords.txt", + "Networking and Security/Week 20/hashcat-exercise/50-crack-these-please", + "Networking and Security/Week 20/hashcat-exercise", + "Networking and Security/Week 20/hashcat-exercise-files.zip", + "Networking and Security/Week 20", + "AI & Data Mining/Week 19/Timeline of History.md", "Penetration Testing/Week 20/Week 20 - Web Attacks.md", - "Penetration Testing/Week 20", + "CWC 3 - Fit for Trade.md", "images/Pasted image 20250129154055.png", "CWC 1 - Consistency.md", "CWC 2 - Warm Welcome.md", @@ -213,16 +225,6 @@ "Data Structures/GPT Answers to Past Paper/Question 6.md", "Penetration Testing/Week 19/AI Summary.md", "Penetration Testing/Week 19/Week 19 - Buffer Overflow.md", - "AI & Data Mining/Week 19/Timeline of History.md", - "Client Server Systems/PHPStorm Repo/js_workshop7/favicon.ico", - "Client Server Systems/PHPStorm Repo/js_workshop7/styles.css", - "Client Server Systems/PHPStorm Repo/js_workshop7/index.html", - "Client Server Systems/PHPStorm Repo/js_workshop7/index.js", - "Client Server Systems/PHPStorm Repo/js_workshop7", - "Client Server Systems/PHPStorm Repo/js_workshop6/styles.css", - "Client Server Systems/PHPStorm Repo/js_workshop6/index.js", - "Client Server Systems/PHPStorm Repo/js_workshop6/index.html", - "Client Server Systems/PHPStorm Repo/js_workshop6/favicon.ico", "Client Server Systems/PHPStorm Repo/php-s1/MVCtemplate-23-24/images/new_uos_logo.jpg", "Client Server Systems/PHPStorm Repo/php-s1/MVCtemplate-23-24/fonts/glyphicons-halflings-regular.svg", "Client Server Systems/PHPStorm Repo/php-s1/workshop6/images/new_uos_logo.jpg", @@ -244,8 +246,6 @@ "Data Structures/Focused Exam Revision.md", "Data Structures/GPT Answers to Past Paper/Question 3.md", "Data Structures/GPT Answers to Past Paper/Question 2.md", - "AI & Data Mining/Week 7/Chapter 13 - ID3.md", - "AI & Data Mining/Week 8/Lecture 16 - Evaluating Concept Descriptions.md", "Database Systems/Untitled.canvas", "Untitled 1.canvas", "Untitled.canvas" diff --git a/AI & Data Mining/Week 20/Week 20 - Intro to Propositional Logic.md b/AI & Data Mining/Week 20/Week 20 - Intro to Propositional Logic.md new file mode 100644 index 0000000..314cabc --- /dev/null +++ b/AI & Data Mining/Week 20/Week 20 - Intro to Propositional Logic.md @@ -0,0 +1,126 @@ +# Propositions + + - Declarative sentences with truth values (T or F) + - Atomic propositions (basic building blocks) + - Compound propositions (combinations of atomic propositions) + +### Argument Form: Modus Ponens (Affirming the Antecedent) + +- Content: If it’s raining, then the ground is wet. The ground is wet. Therefore, it was raining. + +### Argument Form: Disjunctive Syllogism + +- Content: Either it’s raining or the plants need water. It’s not raining. Therefore, the plants need water. + +## Propositional Connectives + + - Negation (¬): p is true if and only if ¬p is false + - Conjunction (∧): p ∧ q is true if and only if both p and q are true + - Disjunction (∨): p ∨ q is true if and only if at least one of p or q is true + - Implication (⇒): p ⇒ q is false if and only if p is true and q is false + - Equivalence (⇔): p ⇔ q is true if and only if p and q have the same truth value +## Precedence Order of Connectives +1. Negation (¬) +2. Conjunction (∧) +3. Disjunction (∨) +4. Implication (⇒) +5. Equivalence (⇔) + +This means that in a formula without parentheses, ¬ takes precedence over ∧ and ∨, ∧ and ∨ have the same precedence but associativity to the left, and ⇒ and ⇔ also have the same precedence but associativity to the right. For example, p ∧ q ⇒ r is equivalent to (p ∧ q) ⇒ r, not p ∧ (q ⇒ r). +### Propositions and Connectives (Examples) + +#### Atomic Propositions: + +- p: The cat is on the mat. +- q: The dog is sleeping. + +#### Compound Propositions Using Connectives: + +- p ∧ q: The cat is on the mat and the dog is sleeping. +- ¬p: It’s not the case that the cat is on the mat. +- p ∨ q: Either the cat is on the mat or the dog is sleeping (or both). +- p ⇒ q: If the cat is on the mat, then the dog is sleeping. +- p ⇔ q: The cat is on the mat if and only if the dog is sleeping. + +#### Natural Language Statements + +- Natural language statement: If you study hard, then you will pass the exam. + - Formalized as: p ⇒ q +- Natural language statement: Either you will go to the party or stay home and study. + - Formalized as: p ∨ ¬q + +#### Logic Formulae + +- Formula: (p ∧ q) ⇒ ¬r + - Interpretation: If both p and q are true, then r is false. +- Formula: ¬(p ∨ ¬q) + - Interpretation: It’s not the case that either p is true or q is false. + +## Truth Tables for Connectives + + - Negation: T|F, F|T + - Conjunction: T&T|TT, F&F|FT, TT|T + - Disjunction: T∨T|TT, F∨F|FF, TF|TF + - Implication: T⇒T|TT, F⇒T|FT, TT|F + - Equivalence: T⇔T|TT, F⇔F|FF, TT|T + +#### Truth Table for P ⇒ Q: + +| P | Q | P ⇒ Q | +| --- | --- | ----- | +| T | T | T | +| T | F | F | +| F | T | T | +| F | F | T | + +## Classes of Propositions + + - Tautologies: Always true (e.g., p ∨ ¬p) + - Contradictions: Always false (e.g., p ∧ ¬p) + - Contingent propositions: Neither tautology nor contradiction + +### Logical Equivalence (≡) + +- Two formulae are logically equivalent if their equivalence is a tautology + +#### Examples + +- p ∧ q ≡ q ∧ p +- ¬(p ∨ q) ≡ ¬p ∧ ¬q + +### Logical Implication or Entailment (|=) + +- Formula p entails q if and only if the implication p ⇒ q is a tautology + +#### Examples + +- p ∧ q |= q +- ¬(p ∨ ¬q) |= ¬p ⇒ q + +# Ambiguous and Vague Sentences + +- Ambiguity: A sentence with multiple distinct meanings. + - Ambiguous sentence: “I want to have dinner with you or your friend.” + - Interpretation 1: You can choose between having dinner with me or my friend. + - Interpretation 2: I want to have dinner with you and your friend together. +- Vagueness: A sentence with only one meaning, but the distinction between truth and falsity is unclear. + - Vague sentence: “The book is heavy.” + - Vague because no quantitative measure of heaviness is provided. + +# Logic as a Formal Language + + - Alphabet: Symbols for denoting propositions, identifiers, punctuation symbols ((), propositional connectives). + - Syntax: Rules defining the order of symbols in sentences, precedence order of connectives. + - Semantics: Assignment of meaning to correctly written sentences. + +### Examples of Logical Structures + +- Argument: If the train has six carriages and serves a rural community, then it is not overcrowded. + - Formalized as: p ∧ q ⇒ ¬r +- Argument: If Bob eats carrots, then he will be able to see in the dark. Therefore, if Bob can’t see in the dark, then he hasn’t eaten carrots. + - Formalized as: p ⇒ q ≡ ¬q ⇒ ¬p +# Summary + + - Logicians focus on argument form + - Deduction involves justifying conclusions based solely on premises + - Connectives join atomic propositions to form compound propositions diff --git a/Networking and Security/.DS_Store b/Networking and Security/.DS_Store index 3cc8ed08687edddf0f3776aa29fd075408ff08a2..55fa0b5ab59bff45ab7c75470d9f18f9129ec655 100644 GIT binary patch literal 8196 zcmeHM%We}f6unMEGf{+;1xP^%G!olV@*)jllZI4?Edz7`C?uWGjyf4fd5}dEY1Z%y zd;$_%zJO2QUs%EMBWPyw6bl5xcVr*ez7P9Yp2>BIh&3l}iKswC7K*@p4%G?~C^(2P&BY0MqD}f;RF1X=7__XbcrfQ}|Tb1JkBVrx;9`W84<%z=p<9p)x0? z%!%p9OlK%eMu(j()rmC}n%Xd67+7XN4>t@xZW>(7rcZ9%irq?B z?b9iAdvuA_loGlhHtF`c+tO>q3no0d{qd_AvuK({}#aBOZ)9UeFs#1JCV2<<+SdxP02=lfWHG zTSpC8Su5Ml7iP1gYVp9XR`1Ub?Ae2|Xjf|UdDgmq=ibAo?MuHO@b_vP7}MKvb+IiP z#f~Rd_0AavJ`c_@BCMh;SK|DngwDDhsqC;Ll@&V@jaQAwljkbBA2Hn>;#IfAt0m%z z6Spp2EfMeWit|w05-)ig#93Vzuf9XP`igkw`wvo$7zQ>nu%|`~BL6>GfB(PHhZ!^s z7zX}r23We~w3=AM;s;Z5IU?7#QQn{k5qhCQX@W|o<3O2?1AqO)5N#W(!lt1yREQpk Pxd@Onn94BlM;Z7DZb>MB delta 151 zcmZp1XfcprU|?W$DortDU=RQ@Ie-{MGjUEV6q~50D9Qtp2a72%80O}uxFqG|Cv7ZT z&dA6!SxV4-@@_$w$-csYlTQh|OtunnnY>EGa${W_%VKs84nbz1ULX+Q1`@6yGdC7~ bXP(S2;|Q`8WGV}YW`fuX7TX-pGlv-fS|%E{ diff --git a/Networking and Security/Week 20/hashcat-exercise-files.zip b/Networking and Security/Week 20/hashcat-exercise-files.zip new file mode 100644 index 0000000000000000000000000000000000000000..c4989f8f49eb8129c59ca214462e57ae43acd5dc GIT binary patch literal 11430 zcmb7~Wl$a6wytrv;O+!pxVt+6f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!u;{5kGe>Il;R}T805$Jz>J_qyP+D!gE)?Ymt|CJ>M|2M3E=Fs@}V1He% z{I9UYKi$Ls@ne4j`#+19{~qtJeaZjIBgFZ)dH>O+{P%c&O%(r+ckcT_^*6kKnl}C! X4f>C91`G`L&wdC223AJ /dev/null +record=$( tail -1 /etc/shadow ) +userdel $user + +passfield=$( echo $record | awk -F : '{print $2}' ) + +hashtype=$( echo $passfield | awk -F $ '{print $2}' ) +salt=$( echo $passfield | awk -F $ '{print $3}' ) +storedpass=$( echo $passfield | awk -F $ '{print $4}' ) + + +echo -en "\nThis is the password record generated in /etc/shadow for a new user with your chosen password: \n\t$record" +echo -en "\nand this is its password related field: \n\t"; echo $record | awk -F : '{print $2}' +echo -en "\n...and these are that password field's components:\n" +echo -en "hash-type code $hashtype" +case $hashtype in + 1 ) + echo ' (md5)' + ;; + 5 ) + echo ' (sha-256)' + ;; + 6) + echo ' (sha-512)' + ;; +esac +echo -e "salt $salt" +echo -e "stored/scrambled password $storedpass" +echo + + + +saltedpassword=$( echo ${salt}${password} ) +echo -e "Salted password (password prefixed with salt):\n\t$saltedpassword" +case $hashtype in + 6 ) + echo -en "pure sha512 hash of this salted password:\n\t" + purehash=$(echo -n $saltedpassword | sha512sum | cut -d " " -f 1) + ;; + 5 ) + echo -en "pure sha256 hash of this salted password:\n\t" + purehash=$(echo -n $saltedpassword | sha256sum | cut -d " " -f 1) + ;; + 1 ) + echo -en "pure md5 hash of this salted password:\n\t" + purehash=$(echo -n $saltedpassword | md5sum | cut -d " " -f 1) + ;; +esac +echo $purehash + +cat<