ajout wireshark
parent
2246c8d2fc
commit
cf3d474e68
@ -0,0 +1,49 @@
|
||||
<?php
|
||||
include ("connect.php");
|
||||
session_start();
|
||||
// creating a connection
|
||||
$connect = mysqli_connect($host, $username, $password, $dbname);
|
||||
// to ensure that the connection is made
|
||||
if ($connect)
|
||||
{
|
||||
// youpie!
|
||||
}
|
||||
else
|
||||
{
|
||||
// pour le dev
|
||||
die("Error" . mysqli_connect_error());
|
||||
// post un message d erreur vers register.php genre pb de connection avec la BDD
|
||||
header('Location: register.php');
|
||||
}
|
||||
|
||||
// getting all values from the HTML form
|
||||
if (isset($_POST['identifiant'], $_POST['password']))
|
||||
{
|
||||
$user = $_POST['identifiant'];
|
||||
$pass = $_POST['password'];
|
||||
$sql = "SELECT * FROM CLIENT WHERE identifiant='$user' AND password='$pass'";
|
||||
|
||||
// fait ta requete a la BDD
|
||||
$rs = mysqli_query($connect, $sql);
|
||||
|
||||
if($rs) // check avec var_dump($rs) pour voir ce qu'il te renvoie quand il trouve l'utilisateur
|
||||
{
|
||||
// envoie un message de login successful
|
||||
header('Location: home.php');
|
||||
}
|
||||
else
|
||||
{
|
||||
// revoie un message login faux ou utilisateur inconnu
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
// renvoie un message d'erreur identifiants non renseignés
|
||||
header('Location: register.php');
|
||||
}
|
||||
|
||||
// close connection
|
||||
mysqli_close($connect);
|
||||
|
||||
?>
|
@ -0,0 +1,37 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://web.resource.org/cc/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="99.996361" height="99.841927" id="svg1315" sodipodi:version="0.32" inkscape:version="0.44" sodipodi:docname="wsicon.svg" inkscape:export-xdpi="230.41" inkscape:export-ydpi="230.41" version="1.0">
|
||||
<defs id="defs1317">
|
||||
<linearGradient id="linearGradient3953">
|
||||
<stop id="stop3955" offset="0" style="stop-color:#d8d8d8;stop-opacity:0.81967211"/>
|
||||
<stop id="stop3957" offset="1.0000000" style="stop-color:#ffffff;stop-opacity:0.01092896"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="linearGradient3500">
|
||||
<stop style="stop-color:#ffffff;stop-opacity:0.74226803;" offset="0.0000000" id="stop3502"/>
|
||||
<stop style="stop-color:#ffffff;stop-opacity:0.27835050;" offset="1.0000000" id="stop3504"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="linearGradient2032">
|
||||
<stop style="stop-color:#40b2e7;stop-opacity:1.0000000;" offset="0.0000000" id="stop2034"/>
|
||||
<stop id="stop2040" offset="1" style="stop-color:#1679a7;stop-opacity:0.93814433;"/>
|
||||
</linearGradient>
|
||||
<radialGradient inkscape:collect="always" xlink:href="#linearGradient2032" id="radialGradient2770" cx="186.8685" cy="319.62469" fx="186.8685" fy="319.62469" r="49.99818" gradientTransform="matrix(1,0,0,0.998456,0,0.501254)" gradientUnits="userSpaceOnUse"/>
|
||||
<linearGradient inkscape:collect="always" xlink:href="#linearGradient3500" id="linearGradient3506" x1="168.88493" y1="283.36218" x2="173.63884" y2="317.43823" gradientUnits="userSpaceOnUse" gradientTransform="matrix(1.023684,0,0,1,-4.386892,-1)"/>
|
||||
<linearGradient inkscape:collect="always" xlink:href="#linearGradient3953" id="linearGradient3951" x1="171.48636" y1="278.75113" x2="171.69682" y2="286.53772" gradientUnits="userSpaceOnUse" gradientTransform="matrix(1.004705,0,0,1.307709,-0.678079,-85.73315)"/>
|
||||
<linearGradient inkscape:collect="always" xlink:href="#linearGradient3953" id="linearGradient1330" gradientUnits="userSpaceOnUse" gradientTransform="matrix(1.004705,0,0,1.307709,-0.678079,-85.73315)" x1="171.48636" y1="278.75113" x2="172.06862" y2="289.87024"/>
|
||||
</defs>
|
||||
<sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="2.0078225" inkscape:cx="169.27934" inkscape:cy="35.464584" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="true" showguides="true" inkscape:grid-points="true" inkscape:window-width="893" inkscape:window-height="733" inkscape:window-x="83" inkscape:window-y="-13"/>
|
||||
<metadata id="metadata1320">
|
||||
<rdf:RDF>
|
||||
<cc:Work rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g inkscape:label="Layer 1" inkscape:groupmode="layer" id="layer1" transform="translate(-133.8768,-274.6418)">
|
||||
<rect style="opacity:1;fill:url(#radialGradient2770);fill-opacity:1;stroke:black;stroke-width:4.5539999;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" id="rect5811" width="95.44236" height="95.287926" x="136.15382" y="276.91879" rx="10" ry="10" inkscape:export-filename="/home/gerald/devel/wsweb/image/wsicon256.png" inkscape:export-xdpi="230.41" inkscape:export-ydpi="230.41"/>
|
||||
<path style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:4.29723692;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" d="M 136.88045,347.36218 L 160.88045,347.36218 C 160.88045,347.36218 164.66365,299.17449 206.73183,298.5108 C 193.16146,319.74868 205.88045,347.36218 205.88045,347.36218 L 230.88045,347.36218" id="path1328" sodipodi:nodetypes="ccccc" inkscape:export-filename="/home/gerald/devel/wsweb/image/wsicon200.png" inkscape:export-xdpi="180.00999" inkscape:export-ydpi="180.00999"/>
|
||||
<path style="fill:url(#linearGradient1330);fill-opacity:1;stroke:none;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1" d="M 141,277.36218 C 148.43358,275.84465 217.41021,275.36218 226,277.36218 C 234.03139,279.23216 204,305.36218 184,305.36218 C 164,305.36218 133.45763,278.90192 141,277.36218 z " id="rect3070" sodipodi:nodetypes="czzz"/>
|
||||
<rect style="opacity:1;fill:white;fill-opacity:0.01092894;stroke:none;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" id="rect5705" width="1" height="0" x="157" y="285.36218" rx="8.9496937" ry="0"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 4.9 KiB |
Binary file not shown.
After Width: | Height: | Size: 108 KiB |
Binary file not shown.
After Width: | Height: | Size: 116 KiB |
Binary file not shown.
After Width: | Height: | Size: 128 KiB |
Binary file not shown.
After Width: | Height: | Size: 135 KiB |
@ -0,0 +1,57 @@
|
||||
# WIRESHARK
|
||||
|
||||
[![WIRESHARK](img/ws-logo.svg)](https://www.wireshark.org/)
|
||||
|
||||
Comment installer Wireshark et capturer le traffic réseau d'un serveur distant via SSH.
|
||||
|
||||
### Installation
|
||||
|
||||
```bash
|
||||
sudo apt install wireshark tcpdump -y
|
||||
```
|
||||
> Note: A installer sur le serveur ainsi que sur la machine cliente "streamant" le flux réseau.
|
||||
|
||||
### Configuration
|
||||
|
||||
- Ajouter l'utilisateur au groupe wireshark
|
||||
```bash
|
||||
sudo usermod -aG wireshark $USER
|
||||
```
|
||||
|
||||
- Récupérer l'interface réseau du serveur distant:
|
||||
```bash
|
||||
ssh -p 2222 remote-user@123.45.67.89
|
||||
# L'interface connectée au réseau est celle qui donne l'adresse IP publique
|
||||
ip a
|
||||
```
|
||||
|
||||
> Note: Il est préférable d'avoir éffectué l'échange de clefs SSH via la commande:
|
||||
```bash
|
||||
ssh-copy-id remote-user@server-ip
|
||||
```
|
||||
|
||||
#### Interface Wireshark
|
||||
|
||||
- Cliquer sur SSH remote capture dans le menu Capture:
|
||||
|
||||
![WS](img/ws1.png)
|
||||
|
||||
- Entrer l'adresse IP publique du serveur ainsi que le port SSH de connection:
|
||||
|
||||
![WS](img/ws2.png)
|
||||
|
||||
- Entrer le nom de l'utilisateur distant du serveur ainsi que le chemin vers la clef SSH privée:
|
||||
|
||||
![WS](img/ws3.png)
|
||||
|
||||
- Renseigner l'interface du serveur distant dans Remote interface ainsi que dans la remote command:
|
||||
|
||||
![WS](img/ws4.png)
|
||||
|
||||
> Note: Il est d'usage d'ajouter l'argument 'not(host server-IP and port SSH)' pour ne pas polluer la capture avec le traffic généré par la connection au serveur.
|
||||
|
||||
Le remote filter se configure automatiquement à la première connection pour enlever le traffic du loopback (127.0.0.1) ainsi que de la machine cliente capturant le flux du serveur.
|
||||
|
||||
### References
|
||||
|
||||
Pour plus d'informations, consulter la [documentation](https://www.wireshark.org/docs/) de Wireshark ou le [wiki](https://gitlab.com/wireshark/wireshark/-/wikis/home)
|
Loading…
Reference in New Issue