diff --git a/bank/index_xss.php b/bank/index_xss.php new file mode 100644 index 0000000..19001a1 --- /dev/null +++ b/bank/index_xss.php @@ -0,0 +1,63 @@ + + + + Poespas Bank + + + + + + + + + + + + + + + +
+
+
+ + +

Welkom bij de Poespas Bank. De bank die u kunt vertrouwen.

+

Vul alleen uw gegevens in als u zeker weet dat u zich op de echte Poespas site bevind.

+ +
+ + +
+
+
+ +
+ + + + + + diff --git a/bank/message.php b/bank/message.php new file mode 100644 index 0000000..c156094 --- /dev/null +++ b/bank/message.php @@ -0,0 +1,52 @@ + + + + + Poespas Bank + + + + + + + + + + + + + + + +
+
+
+ +
+ +
+ +
+ +
+
+
+ +
+ + + + + + diff --git a/build-vm/database.sql b/build-vm/database.sql index efb0616..4f0b266 100644 --- a/build-vm/database.sql +++ b/build-vm/database.sql @@ -1,4 +1,4 @@ --- Don't look here for answers you cheater. +-- Don't look here for answers you cheater. -- Go out there and actually hack those sites! @@ -26,6 +26,7 @@ END ;$$ DELIMITER ; CALL `temp`.`drop_user_if_exists`('webshop') ; CALL `temp`.`drop_user_if_exists`('bank') ; +CALL `temp`.`drop_user_if_exists`('nieuws') ; DROP DATABASE temp; CREATE USER 'webshop'@'localhost' IDENTIFIED BY 'pass'; @@ -86,3 +87,19 @@ INSERT INTO `gebruikers` (`gebruikersnaam`, `wachtwoord`, `balans`) VALUES ('Bob', '123456', 10.00), ('Carol', 'cuteasabuttonintheeyes', 42.00); +CREATE USER 'nieuws'@'localhost' IDENTIFIED BY 'pass'; +GRANT ALL PRIVILEGES ON `nieuws`.* TO 'nieuws'@'localhost'; + +DROP DATABASE IF EXISTS nieuws; +CREATE DATABASE nieuws; +USE nieuws; + +CREATE TABLE `commentaar` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `auteur` varchar(255) NOT NULL, + `bericht` text NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; + +INSERT INTO `commentaar` (`id`, `auteur`, `bericht`) VALUES +(1, 'Paul', 'Hoera!'); \ No newline at end of file diff --git a/index.php b/index.php index 340acc6..3112317 100644 --- a/index.php +++ b/index.php @@ -1,10 +1,10 @@ De virtuele machine werkt! Lees de opgave om te beginnen met hacken. -

SQL Injection

-

Bank

-Bank (multi_query) +Bank (multi_query)
+Bank (xss)

Webshop

Webshop (replace) +

Nieuws

\ No newline at end of file diff --git a/nieuws/admincheck.js b/nieuws/admincheck.js new file mode 100644 index 0000000..b864e96 --- /dev/null +++ b/nieuws/admincheck.js @@ -0,0 +1,6 @@ +var page = require('webpage').create(); +page.open('http://localhost/nieuws/', 'post', 'email=admin@nieuws.nl&password=sesame', function() { + setTimeout(function(){ + phantom.exit(); + }, 1000); +}); \ No newline at end of file diff --git a/nieuws/admincheck.php b/nieuws/admincheck.php new file mode 100644 index 0000000..5e79623 --- /dev/null +++ b/nieuws/admincheck.php @@ -0,0 +1,57 @@ +query("INSERT INTO commentaar SET auteur='anoniem', bericht='".$connection->real_escape_string($_POST['comment'])."'"); +} +?> + + + + NIEUWS.nl + + + + + + + + + + + + + + +
+
. Het laatste nieuws het eerst op NIEUWS.nl
+ + +
+De administrator heeft op '.date('r').' een kijkje op de reactie pagina genomen
'; +} +?> + + Problemen met de website? Laat het de administrator weten en hij komt een kijkje nemen op de reactie pagina. +
+ +
+ +
+ + diff --git a/nieuws/index.php b/nieuws/index.php new file mode 100644 index 0000000..2da3c91 --- /dev/null +++ b/nieuws/index.php @@ -0,0 +1,105 @@ +query("INSERT INTO commentaar SET auteur='anoniem', bericht='".$connection->real_escape_string($_POST['comment'])."'"); +} +?> + + + + NIEUWS.nl + + + + + + + + + + + + + + +
+
. Het laatste nieuws het eerst op NIEUWS.nl
+ + +
+ Welkom terug administrator! De geheime code is: "Setec Astronomy". +
+ + +
Algemeen / Binnenland
+ +
+
Gepubliceerd: 23 oktober 2012 06:35
+
Laatste update: 23 oktober 2012 06:35
+ +

Avans opnieuw beste hogeschool

+ +

LEIDEN - Hogeschool Avans in Noord-Brabant is opnieuw de beste grote hbo-instelling van Nederland.

+ + +

Dat staat in de dinsdag verschenen Keuzegids Hbo Voltijd 2013. Deze gids vergelijkt hogescholen op basis van statistieken over studiesucces, oordeel van deskundigen uit de accreditatie en het oordeel van studenten.

+ +

Avans krijgt 71 punten, evenveel als vorig jaar. Ook de nummer 2 is onveranderd: Hogeschool Zeeland in Vlissingen. De NHTV in Breda is de nieuwe nummer 3. Hogeschool InHolland is net als vorig jaar de hekkensluiter van de lijst met 51 punten.

+ +

Bij de middelgrote hogescholen met gemiddeld ongeveer 2000 studenten moet de Christelijke Hogeschool Ede (81 punten) voor het eerst in jaren de bovenste plaats afstaan aan een ander.

+ +

De Gereformeerde Hogeschool uit Zwolle wordt met 85,5 punten beter beoordeeld. De Hotelschool Den Haag is een opvallende stijger, mede door een bijzonder gunstig deskundigenoordeel klommen zij van de tiende naar de vijfde plaats.

De hoogste scores zijn nog steeds te vinden bij de kleinste scholen. De Katholieke Pabo Zwolle en het IVA in Driebergen voeren al jaren de ranglijst aan met respectievelijk 92 en 88 punten. In de Keuzegids staat dat dat met name te danken is aan het feit dat zij slechts één hbo-opleiding aanbieden, die ook nog eens uitstekend verzorgd is. ''Eigen identiteit en - daardoor - een sterke binding met de studenten zijn belangrijke troeven",' zo valt te lezen in de gids.

+ + Door: ANP +
+ +
+ Jouw reactie: +
+
+ +
+query("SELECT * FROM commentaar ORDER BY id DESC") + or die('Query error: ' . $connection->error); + + while ($row = $result->fetch_array()) { + ?> + +
+
+ door +
+

+
+ + close(); + ?> + +
+ +
+ +
+ Meld een probleem met deze website +
+
+ + diff --git a/nieuws/login.php b/nieuws/login.php new file mode 100644 index 0000000..0d1ca56 --- /dev/null +++ b/nieuws/login.php @@ -0,0 +1,41 @@ + + + + + NIEUWS.nl + + + + + + + + + + + + + + + + +
+
. Het laatste nieuws het eerst op NIEUWS.nl
+ +
+ + + + +
+
+ + + diff --git a/nieuws/reset.php b/nieuws/reset.php new file mode 100644 index 0000000..74108ea --- /dev/null +++ b/nieuws/reset.php @@ -0,0 +1,9 @@ +query("TRUNCATE commentaar"); + +?> +Alle reacties weggehaald. \ No newline at end of file diff --git a/themes/css/nieuws.css b/themes/css/nieuws.css new file mode 100755 index 0000000..1f93ff0 --- /dev/null +++ b/themes/css/nieuws.css @@ -0,0 +1,122 @@ +body { + font-family: Arial,helvetica,sans-serif; +} + +img { + float: left; +} + +img#logo { + margin: 30px; +} + +article img { + margin-right: 15px; +} + +section#middle { + float: left; + width: 600px; +} + +#datum { + height: 30px; + font-size: 11px; + line-height: 28px; + color: #05054c; + border-top: 1px dotted black; + border-bottom: 1px dotted black; + margin-bottom: 10px; + margin-top: 20px; +} + +#category { + height: 24px; + line-height: 24px; + color: white; + font-size: 15px; + font-weight: bold; + padding-left: 5px; + + background-image: -webkit-gradient( + linear, + left top, + left bottom, + color-stop(0, #98C4E5), + color-stop(1, #7AA2C1) + ); + background-image: -o-linear-gradient(bottom, #98C4E5 0%, #7AA2C1 100%); + background-image: -moz-linear-gradient(bottom, #98C4E5 0%, #7AA2C1 100%); + background-image: -webkit-linear-gradient(bottom, #98C4E5 0%, #7AA2C1 100%); + background-image: -ms-linear-gradient(bottom, #98C4E5 0%, #7AA2C1 100%); + background-image: linear-gradient(to bottom, #98C4E5 0%, #7AA2C1 100%); +} + +textarea { + width: 60%; + height: 100px; +} + +article { + background-color: #eaf0fa; + margin-top: 5px; + padding: 5px; + margin-bottom: 20px; +} + +#published, #update { + color: #445774; + line-height: 1.5em; + font-size: 10px; +} + +h1 { + font-size: 30px; + color: #020051; + margin-bottom: 8px; +} + +h2.summary { + font-size: 13px; + line-height: 18px; + color: rgb(68, 87, 117); +} + +p { + color: rgb(2, 0, 81); + font-size: 13px; + line-height: 18px; + padding-bottom: 10px; +} +a { + color: rgb(2, 0, 81); + text-decoration: underline; +} + +.comment { + border: 1px solid rgb(217, 226, 240); + margin-bottom: 10px; +} + +.comment-header { + background-color: rgb(217, 226, 240); + color: rgb(71, 91, 117); + font-size: 11px; + padding: 2px; + padding-left: 20px; +} + +.comment-header .author { + color: rgb(57, 73, 95); + font-weight: bold; +} + +.comment p { + margin: 0; + padding: 10px; +} + +#admincheck { + margin-top: 20px; + margin-bottom: 30px; +} diff --git a/themes/images/nieuws.png b/themes/images/nieuws.png new file mode 100644 index 0000000..cef6608 Binary files /dev/null and b/themes/images/nieuws.png differ diff --git a/themes/images/school.jpg b/themes/images/school.jpg new file mode 100644 index 0000000..bb8c547 Binary files /dev/null and b/themes/images/school.jpg differ diff --git a/webshop/image_zoom escapehtml.php b/webshop/image_zoom escapehtml.php new file mode 100644 index 0000000..4b03136 --- /dev/null +++ b/webshop/image_zoom escapehtml.php @@ -0,0 +1,61 @@ + + + + + Lekkende Kranen Empirium + + + + + + + + + + + + + + + + +
+
+
+ +
+ + ' style="width:50%; margin: 0 auto;"/> + +
+
+ + + diff --git a/webshop/image_zoom.php b/webshop/image_zoom.php new file mode 100644 index 0000000..17cf266 --- /dev/null +++ b/webshop/image_zoom.php @@ -0,0 +1,61 @@ + + + + + Lekkende Kranen Empirium + + + + + + + + + + + + + + + + +
+
+
+ +
+ + + +
+
+ + + diff --git a/webshop/product_detail.php b/webshop/product_detail.php index 171ee33..95b477d 100644 --- a/webshop/product_detail.php +++ b/webshop/product_detail.php @@ -72,7 +72,9 @@ $connection->close();