Copier docker pull ubuntu:latest
docker run -dit --name ssrf_first_lab ubuntu
docker exec -it ssrf_first_lab bash
apt update
apt install apache2 php nano python3 lsof -y
service apache2 start
lsof -i:80 # vérifier si le site web est actif
Copier <? php
if ( isset ( $_GET[ 'url' ] ) ) {
$url = $_GET[ 'url' ];
echo "\n[+] Listing the content of the website " . $url . ":\n\n" ;
include ($url);
} else {
echo "\n[!] No value has been provided for the URL parameter\n\n" ;
}
?>
Copier <! DOCTYPE html >
< html >
< head >
< meta name = "viewport" content = "width=device-width, initial-scale=1" >
< title > Login Page </ title >
< style >
Body {
font-family : Calibri , Helvetica , sans-serif ;
background-color : pink ;
}
button {
background-color : #4CAF50 ;
width : 100 % ;
color : orange ;
padding : 15 px ;
margin : 10 px 0 px ;
border : none ;
cursor : pointer ;
}
form {
border : 3 px solid #f1f1f1 ;
}
input [ type = text ] , input [ type = password ] {
width : 100 % ;
margin : 8 px 0 ;
padding : 12 px 20 px ;
display : inline-block ;
border : 2 px solid green ;
box-sizing : border-box ;
}
button :hover {
opacity : 0.7 ;
}
.cancelbtn {
width : auto ;
padding : 10 px 18 px ;
margin : 10 px 5 px ;
}
.container {
padding : 25 px ;
background-color : lightblue ;
}
</ style >
</ head >
< body >
< center > < h1 > Student Login Form (PRO) </ h1 > </ center >
< form >
< div class = "container" >
< label >Username : </ label >
< input type = "text" placeholder = "Enter Username" name = "username" required >
< label >Password : </ label >
< input type = "password" placeholder = "Enter Password" name = "password" required >
< button type = "submit" >Login</ button >
< input type = "checkbox" checked = "checked" > Remember me
< button type = "button" class = "cancelbtn" > Cancel</ button >
Forgot < a href = "#" > password? </ a >
</ div >
</ form >
</ body >
</ html >
Copier python3 -m 4646 --bind 127.0.0.1