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

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen
 
(8 dazwischenliegende Versionen von 2 Benutzern werden nicht angezeigt)
Zeile 2: Zeile 2:
 
<pre>
 
<pre>
 
<?php
 
<?php
   if(isset($_POST['submit'])){
+
   if(isset($_GET['submit'])){
     $msg = $_POST['msg'];
+
     $msg = $_GET['msg'];
 
   }
 
   }
 
?>
 
?>
Zeile 11: Zeile 11:
 
         <body>
 
         <body>
 
                 <h2>Authentifizierung</h2>
 
                 <h2>Authentifizierung</h2>
                 <form method="post">
+
                 <form method="get">
 
                   <label for="fname">Input</label><br>
 
                   <label for="fname">Input</label><br>
 
                   <input type="text" name="msg"><br>
 
                   <input type="text" name="msg"><br>
Zeile 27: Zeile 27:
  
 
</pre>
 
</pre>
=Payload=
+
*[[xss-poc-js-reverse-shell]]
<script>alert("xinux hack")</script>
+
*[[xss-poc-reverse-shell]]
=Daraus resultierender Link=
+
=Links=
;zum verschicken
+
*https://rioasmara.com/2020/09/21/from-xss-csrf-command-injection-to-reverse-shell/
*http://opfer.secure.local/xss.php?msg=+%3Cscript%3Ealert%28%22xinux+hack%22%29%3C%2Fscript%3E&submit=klick
+
*https://www.hackingarticles.in/cross-site-scripting-exploitation/
 
 
=Ergebnis=
 
[[Datei:Xinux-hack.png]]
 

Aktuelle Version vom 9. März 2023, 14:45 Uhr

Script

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

<!DOCTYPE html>
<html>
        <body>
                <h2>Authentifizierung</h2>
                <form method="get">
                  <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>

Links