Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
blog.limos.fr
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Boris LONJON
blog.limos.fr
Commits
59bd1624
Commit
59bd1624
authored
7 years ago
by
mazenovi
Browse files
Options
Downloads
Patches
Plain Diff
finsih websec post
parent
612db9df
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
content/Etudiants/zz2-f5-websec.md
+76
-35
76 additions, 35 deletions
content/Etudiants/zz2-f5-websec.md
with
76 additions
and
35 deletions
content/Etudiants/zz2-f5-websec.md
+
76
−
35
View file @
59bd1624
...
@@ -56,7 +56,14 @@ Tags: cours
...
@@ -56,7 +56,14 @@ Tags: cours
## Recréer l'environnement de cours dans VirtualBox
## Recréer l'environnement de cours dans VirtualBox
sous windows voudevrez peut être utiliser le path entier de vboxmanage
*
testé avec
[
VirtualBox 5.1.30
](
https://www.virtualbox.org/wiki/Download_Old_Builds_5_1
)
*
et les
[
extensions pack associés
](
http://download.virtualbox.org/virtualbox/5.1.30/Oracle_VM_VirtualBox_Extension_Pack-5.1.30-118389.vbox-extpack
)
```
VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-5.1.30-118389.vbox-extpack
```
sous windows vous devrez peut être utiliser le path entier de vboxmanage
```
```
"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe"
"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe"
...
@@ -64,7 +71,7 @@ sous windows voudevrez peut être utiliser le path entier de vboxmanage
...
@@ -64,7 +71,7 @@ sous windows voudevrez peut être utiliser le path entier de vboxmanage
### Créer un réseau NAT
### Créer un réseau NAT
```
```
bash
vboxmanage natnetwork add
--netname
natwebsec
--network
"10.0.2.0/24"
--enable
--dhcp
off
vboxmanage natnetwork add
--netname
natwebsec
--network
"10.0.2.0/24"
--enable
--dhcp
off
```
```
...
@@ -72,7 +79,7 @@ vboxmanage natnetwork add --netname natwebsec --network "10.0.2.0/24" --enable
...
@@ -72,7 +79,7 @@ vboxmanage natnetwork add --netname natwebsec --network "10.0.2.0/24" --enable
voir
[
https://drive.mesocentre.uca.fr/d/69e5535b0b88425396d7/
](
https://drive.mesocentre.uca.fr/d/69e5535b0b88425396d7/
)
voir
[
https://drive.mesocentre.uca.fr/d/69e5535b0b88425396d7/
](
https://drive.mesocentre.uca.fr/d/69e5535b0b88425396d7/
)
```
```
bash
wget https://drive.mesocentre.uca.fr/d/69e5535b0b88425396d7/files/?p
=
/debian.ova
wget https://drive.mesocentre.uca.fr/d/69e5535b0b88425396d7/files/?p
=
/debian.ova
wget https://drive.mesocentre.uca.fr/d/69e5535b0b88425396d7/files/?p
=
/proxy.ova
wget https://drive.mesocentre.uca.fr/d/69e5535b0b88425396d7/files/?p
=
/proxy.ova
wget https://drive.mesocentre.uca.fr/d/69e5535b0b88425396d7/files/?p
=
/kali.ova
wget https://drive.mesocentre.uca.fr/d/69e5535b0b88425396d7/files/?p
=
/kali.ova
...
@@ -89,7 +96,7 @@ wget https://drive.mesocentre.uca.fr/d/69e5535b0b88425396d7/files/?p=/thenetwork
...
@@ -89,7 +96,7 @@ wget https://drive.mesocentre.uca.fr/d/69e5535b0b88425396d7/files/?p=/thenetwork
### Importer les images OVA
### Importer les images OVA
```
```
bash
vboxmanage import debian.ova
vboxmanage import debian.ova
vboxmanage import proxy.ova
vboxmanage import proxy.ova
vboxmanage import kali.ova
vboxmanage import kali.ova
...
@@ -98,70 +105,81 @@ vboxmanage import thenetwork.ova
...
@@ -98,70 +105,81 @@ vboxmanage import thenetwork.ova
### Mettre en place le port-forwarding sur proxy
### Mettre en place le port-forwarding sur proxy
```
```
bash
vboxmanage natnetwork modify
--netname
natwebsec
--port-forward-4
"ssh:tcp:[127.0.0.1]:1337:[10.0.2.3]:22"
vboxmanage natnetwork modify
--netname
natwebsec
--port-forward-4
"ssh:tcp:[127.0.0.1]:1337:[10.0.2.3]:22"
```
```
### Se connecter en ssh
### Se connecter en ssh
```
```
bash
ssh
-p
1337 student@127.0.0.1
ssh
-p
1337 student@127.0.0.1
```
```
### /etc/hosts
```
10.0.2.1 us.er
10.0.2.2 debian
10.0.2.2 mutillid.ae good.one go.od targ.et
10.0.2.2 dvwa.com dv.wa
10.0.2.2 good.one go.od targ.et d.oc dum.my
10.0.2.2 drup.al hackable-drupal.com drupal
10.0.2.2 wordpre.ss bl.og wp wordpress
10.0.2.2 spip sp.ip
10.0.2.3 proxy
10.0.2.3 secured heart.bleed fo.ol
10.0.2.4 kali
10.0.2.4 bad.guy hack.er 1337.net
10.0.2.5 thenetwork
```
## Sur proxy et thenetwork
## Sur proxy et thenetwork
si
si
```
```
bash
ping 10.0.2.4
# ping sur kali
ping 10.0.2.4
# ping sur kali
```
```
renvoie
renvoie
```
```
bash
connect: Network is unreachable
connect: Network is unreachable
```
```
vérifier le numéro de votre interface réseau
vérifier le numéro de votre interface réseau
```
```
bash
ifconfig -a
student@proxy:~
$
ifconfig
-a
eth2 Link encap:Ethernet HWaddr 08:00:27:ae:b5:20
inet adr:10.0.2.3 Bcast:10.0.2.255 Masque:255.255.255.0
adr inet6: fe80::a00:27ff:feae:b520/64 Scope:Lien
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Packets reçus:24 erreurs:0 :0 overruns:0 frame:0
TX packets:32 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 lg file transmission:1000
Octets reçus:4789
(
4.7 KB
)
Octets transmis:4679
(
4.6 KB
)
lo Link encap:Boucle locale
inet adr:127.0.0.1 Masque:255.0.0.0
adr inet6: ::1/128 Scope:Hôte
UP LOOPBACK RUNNING MTU:16436 Metric:1
Packets reçus:54 erreurs:0 :0 overruns:0 frame:0
TX packets:54 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 lg file transmission:0
Octets reçus:4076
(
4.0 KB
)
Octets transmis:4076
(
4.0 KB
)
```
```
par exemple ce numéro peut être eth2 au lieu de eth0
par exemple ce numéro peut être eth2
(comme ci dessus)
au lieu de eth0
il faut alors modifier le fichier /etc/network/interfaces en fonction
il faut alors modifier le fichier /etc/network/interfaces en fonction
```
```
student@proxy:~$ sudo vi /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
# iface eth2 inet dhcp
iface eth0 inet static
address 10.0.2.3
netmask 255.255.255.0
gateway 10.0.2.1
```
```
puis activer l'interface réseau
puis activer l'interface réseau
```
```
sudo ifup eth2
student@proxy:~$
sudo ifup eth2
```
```
réessayer
réessayer
...
@@ -170,7 +188,30 @@ réessayer
...
@@ -170,7 +188,30 @@ réessayer
ping 10.0.2.4 # ping sur kali
ping 10.0.2.4 # ping sur kali
```
```
Ce bug est du à la numérotation fantaisiste d'Ubuntu des interfaces réseau ...
Ce bug est dû à la numérotation fantaisiste d'Ubuntu des interfaces réseau ...
### /etc/hosts FYI
```
10.0.2.1 us.er
10.0.2.2 debian
10.0.2.2 mutillid.ae good.one go.od targ.et
10.0.2.2 dvwa.com dv.wa
10.0.2.2 good.one go.od targ.et d.oc dum.my
10.0.2.2 drup.al hackable-drupal.com drupal
10.0.2.2 wordpre.ss bl.og wp wordpress
10.0.2.2 spip sp.ip
10.0.2.3 proxy
10.0.2.3 secured heart.bleed fo.ol
10.0.2.4 kali
10.0.2.4 bad.guy hack.er 1337.net
10.0.2.5 thenetwork
```
### see also
### see also
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment