From Aldeid

Jump to: navigation, search

Contents

Command Injection

Description

Incomplete.png
INCOMPLETE SECTION OR ARTICLE
This section/article is being written and is therefore not complete.
Thank you for your comprehension.

Exercice

Le but de cet exercice est de vous montrer comment réaliser de l'injection de commandes dans un formulaire.

Pour ce faire, lancer WebScarab puis cliquer sur le bouton "View" après avoir sélectionné un élément dans la liste déroulante.

L'interception de la requête dans WebScarab nous permet d'injecter des commandes (netstat -an et ipconfig) dans le formulaire. Collez la chaîne suivante juste après "AccessControlMatrix.help" :

Linux

" & netstat -ant & ifconfig

Command-injection 3.png

Command-injection 4.png

Windows

" & netstat -an & ipconfig

Command-injection 1.png

Command-injection 2.png

Patch de sécurité

Le patch a été appliqué dans le fichier

~/WebGoat-5.2/tomcat/webapps/WebGoat/JavaSource/org/owasp/webgoat/lessons/CommandInjection.java

Pour appliquer la modification, il est nécessaire de recompiler cette source.

Aldeid.com • Sébastien DAMAYE • Network Security, Ethical Hacking, Network Forensics