Sehr oft Programmierer, nicht in ihre Web-Anwendungen Sicherheit bringen für die einfache Tatsache, dass sie nicht wissen, die Risiken…
Hier ist ein Beispiel für anfällige Anwendung php, mit seinem Schema MySQL:
Beispiel:
Tabelle: Benutzer(id int, Benutzer char(25), Kennwort char(25), );
+---+---------+----------------------------------+
| 1 | admin | Kennwort 1 |
+---+---------+----------------------------------+
| 2 | pepelux | password2 |
+---+---------+----------------------------------+
Tabelle: Nachrichten(id int, Titel char(25), Text Text), );
+---+---------+----------------------------------+
| 1 | title | content 1 |
+---+---------+----------------------------------+
| 2 | Titel | Inhalt 1 |
+---+---------+----------------------------------+
Anfällige Code:
<?php
@include("config.php")
$id = $_GET['id'];
$result = mysql_query("SELECT title,text FROM news WHERE id=$id LIMIT 1");
$row = mysql_fetch_array($result);
....
?>
(mehr…)