Skip to content
Snippets Groups Projects
Commit 465b889c authored by Vincent Mazenod's avatar Vincent Mazenod
Browse files

finish authentication

parent b5133459
No related branches found
No related tags found
No related merge requests found
Pipeline #10868 failed
content/slides/1337/images/lab/keyboard.png

28.5 KiB

content/slides/1337/images/lab/lab.jpg

14.8 KiB

content/slides/1337/images/lab/mapping.png

157 KiB

content/slides/1337/images/lab/sudo.png

22.2 KiB

content/slides/1337/images/lab/vim.png

106 KiB

content/slides/1337/images/lab/virtualbox.png

170 KiB

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>Web Sec Lab</title>
<link rel="stylesheet" href="../../node_modules/reveal.js/css/reveal.css">
<link rel="stylesheet" href="../../node_modules/reveal.js/css/theme/black.css">
<!-- Theme used for syntax highlighting of code -->
<link rel="stylesheet" href="../../node_modules/reveal.js/lib/css/zenburn.css">
<link rel="stylesheet" href="../../node_modules/@fortawesome/fontawesome-free/css/all.min.css">
<link rel="stylesheet" href="../main.css">
<!-- Printing and PDF exports -->
<script>
var link = document.createElement( 'link' );
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = window.location.search.match( /print-pdf/gi ) ? '../../node_modules/reveal.js/css/print/pdf.css' : '../../node_modules/reveal.js/css/print/paper.css';
document.getElementsByTagName( 'head' )[0].appendChild( link );
</script>
</head>
<body>
<div class="reveal">
<div class="slides">
<section data-markdown="md/lab.md"
data-separator="^\n\n\n"
data-separator-vertical="^\n\n"
data-separator-notes="^Note:"
data-charset="utf-8">
</section>
</div>
</div>
<!-- script src="../../node_modules/reveal.js/lib/js/head.min.js"></script -->
<script src="../../node_modules/reveal.js/js/reveal.js"></script>
<script>
// More info about config & dependencies:
// - https://github.com/hakimel/reveal.js#configuration
// - https://github.com/hakimel/reveal.js#dependencies
Reveal.initialize({
controls: true,
progress: true,
history: true,
center: false,
dependencies: [
{ src: '../../node_modules/reveal.js/plugin/markdown/marked.js' },
{ src: '../../node_modules/reveal.js/plugin/markdown/markdown.js',
condition: function() { return !!document.querySelector( '[data-markdown]' ); },
callback: function() {
Array.prototype.forEach.call(document.querySelectorAll('section > li'), function(ele){
var fragIndex = ele.innerHTML.indexOf("--")
if (fragIndex != -1){
ele.innerHTML = ele.innerHTML.replace("--", "");
ele.className = 'fragment';
}
});
}
},
{ src: '../../node_modules/reveal.js/plugin/notes/notes.js', async: true },
{ src: '../../node_modules/reveal.js/plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } }
]
});
</script>
</body>
</html>
## authentification
"<i class="fa fa-wikipedia-w" aria-hidden="true"></i> processus permettant à un système de s'assurer de la légitimité de la demande d'accès faite par une entité (être humain ou un autre système...) afin d'autoriser l'accès de cette entité à des ressources du système (systèmes, réseaux, applications…) conformément au paramétrage du contrôle d'accès ."
"processus permettant à un système de s'assurer de la légitimité de la demande d'accès faite par une entité (être humain ou un autre système...) afin d'autoriser l'accès de cette entité à des ressources du système (systèmes, réseaux, applications…) conformément au paramétrage du contrôle d'accès ."
<i class="fa-brands fa-wikipedia-w"></i>ikipédia
## 3 concepts
......@@ -153,7 +155,7 @@ $ sudo service apache2 reload
## auth digest
!["Basic Digest Auth"](images/authentication/http-digest-auth.png "Basic Digest Auth")
!["Basic Digest Auth"](images/authentication/http-digest-auth.png "Basic Digest Auth")<!-- .element style="background-color: white" -->
## auth digest .htaccess
......@@ -347,11 +349,49 @@ patator http_fuzz method=GET follow=0 accept_cookie=0 --threads=1 --rate-li
```
* [patator](https://github.com/lanjelot/patator)
* resolv= -> buggy version https://bytemeta.vip/repo/lanjelot/patator/issues/174
* resolv= -> [buggy version](https://bytemeta.vip/repo/lanjelot/patator/issues/174)
## Brute force [hard]
capturer la soumission du formulaire
![capturer la soumission du formulaire dans Proxy](images/authentication/dvwa-auth-high-capture-request.png)<!-- .element style="width: 90%" -->
## Brute force [hard]
envoyer la requête dans *Intruder*
![envoyer la requête dans Intruder](images/authentication/dvwa-auth-high-send-intruder.png)<!-- .element style="width: 90%" -->
## Brute force [hard]
* onglet *Intruder*
* *attack type* -> *pitchfork*
* ne laisser que password et user_token en paramètres
![Intruder configuré](images/authentication/dvwa-auth-high-intruder-clean.png)<!-- .element style="width: 90%" -->
## Brute force [hard]
* onglet *Payloads*
* *Payload set*: 1 (mot de passe) -> *Simple list*
* *Payload settings [Simple list]* -> *load* -> */usr/share/wordslists/fasttrack.txt*
![Intruder / mot de passe](images/authentication/dvwa-auth-high-simple-list.png)<!-- .element style="width: 90%" -->
## Brute force [hard]
* *Payload set*: 2 (token anti CSRF) -> *Recursive grep*
* onglet *Settings*
* *Grep - Extract* -> *add*
![Intruder / mot de passe](images/authentication/dvwa-auth-high-define-grep-extract.png)<!-- .element style="width: 90%" -->
## Brute force [hard]
* onglet *Resource pool*
* cocher *create new resource pool*
![Intruder / Ressource](images/authentication/dvwa-auth-high-ressources.png)<!-- .element style="width: 90%" -->
## Brute force [hard]
![Intruder / Resolved](images/authentication/dvwa-auth-high-resolved.png)<!-- .element style="width: 90%" -->
## attaques offline
......@@ -412,8 +452,5 @@ unshadow /etc/passwd /etc/shadow > mypasswd
* instaurer des règles de durcissement au moment du choix du mot de passe
* pas contournable côté client ;)
* sensibilisez vos utilisateurs
* [<i class="fa fa-desktop"></i> Se protéger avec de bons mots de passe](http://doc.m4z3.me/_/bpu/se_proteger_avec_de_bons_mots_de_passe.htm#/cover)
* [<i class="fa fa-video-camera"></i> Se protéger avec de bons mots de passe](http://webtv.u-clermont1.fr/media-MEDIA150410174414391)
* mettre en place un deuxième facteur d'authentification
* utiliser la crypto asymétrique
## web sec lab
![web sec lab](images/lab/lab.jpg "web sec lab")
### h4PpY H4Ck1nG
## VirtualBox
![VirtualBox](images/lab/virtualbox.png)
## Kali
![Kali](images/lab/kali.svg)<!-- .element style="width: 50%" -->
* [<i class="fa-solid fa-download"></i> get kali](https://www.kali.org/get-kali)
* [<i class="fa fa-video-camera"></i> tongues of kali](https://www.youtube.com/watch?v=dH9wCRQFVR0) <- rien à voir ;)
## Keyboard Mapping
![French keyboard](images/lab/mapping.png)<!-- .element style="width: 70%" -->
## Connexion
![Connexion](images/lab/connexion.png)
* username:password
* kali:kali
## Definitive Keyboard Mapping
![Definitve French keyboard](images/lab/keyboard.png)
* `sudo vi /etc/default/keyboard`
* replace `"us"`
* by `"fr"`
## sudo without password
![sudo without password](images/lab/sudo.png)
* `sudo vi /etc/sudoers`
* replace `%sudo ALL=(ALL:ALL) ALL`
* by `%sudo ALL=(ALL) NOPASSWD:ALL`
* see although `/etc/group`
## Vim
![vim](images/lab/vim.png)<!-- .element style="width: 40%" -->
#### [<i class="fa-solid fa-gift"></i> survival cheatsheet](https://ryanstutorials.net/linuxtutorial/cheatsheetvi.php)
## burp suite
* next / next / accept / ...
* Proxy -> proxy settings
![proxy settings](images/lab/burp.png)<!-- .element style="width: 80%" -->
## toggle FF proxy
install [Proxy Switcher and Manager](https://addons.mozilla.org/fr/firefox/addon/proxy-switcher-and-manager/)
![ff proxy settings / step 1](images/lab/ff-proxy-step-1.png)<!-- .element style="width: 30%" -->
## toggle FF proxy
![ff proxy settings / step 2](images/lab/ff-proxy-step-2.png)<!-- .element style="width: 50%" -->
## toggle FF proxy
![ff proxy settings / step 3](images/lab/ff-proxy-step-3.png)
## toggle FF proxy
![ff proxy settings / step 4](images/lab/ff-proxy-step-4.png)
## toggle FF proxy
![ff proxy settings / step 5](images/lab/ff-proxy-step-5.png)<!-- .element style="width: 80%" -->
## toggle FF proxy
![ff proxy settings / step 6](images/lab/ff-proxy-step-6.png)
## DVWA
* htaccess to protect vm
## Debian
![debian](images/lab/debian.gif)<!-- .element style="width: 30%" -->
* https://www.osboxes.org/debian
* username:password
* osboxes:osboxes.org
......@@ -24,3 +24,7 @@
padding: 0.2em 0.5em 0.2em 0.5em;
border-bottom: 1px solid;
}
reveal code {
background-color: gray;
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment