├── .github └── FUNDING.yml ├── README.md ├── html ├── buy.php ├── exec.php ├── log.php ├── portfolio.php ├── sqlinject.php ├── xsrf.html └── xss.php └── owasp.sql /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | custom: http://paypal.me/jayaditya11 13 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # OWASP_DEMO 2 | just a bunch of vulnerable web pages for demo 3 | 4 | ##Database 5 | Jut import the database using phpmyadmin or execute queries manually . 6 | 7 | No UI has been made , it's just basic demo to show how some attacks works. 8 | -------------------------------------------------------------------------------- /html/buy.php: -------------------------------------------------------------------------------- 1 | 14 | 15 | 16 |
17 |You just bought {$_GET['shares']} shares of {$_GET['symbol']}!
"; 33 | } 34 | ?> 35 | 36 | 37 | -------------------------------------------------------------------------------- /html/exec.php: -------------------------------------------------------------------------------- 1 | 18 | 19 | 20 |Available commands:
24 | 32 |Output of last command:
34 |35 | 39 |40 | 41 | 42 | -------------------------------------------------------------------------------- /html/log.php: -------------------------------------------------------------------------------- 1 | prepare('INSERT INTO cookies (cookie) VALUES (:cookie)'); 19 | $stmt->bindValue(':cookie',$_GET['x']); 20 | $stmt->execute(); 21 | } 22 | -------------------------------------------------------------------------------- /html/portfolio.php: -------------------------------------------------------------------------------- 1 |
Current portfolio:
34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /html/sqlinject.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |This is my completely benign website. Trust me.
12 | 13 |Comment |
---|
{$comment[1]} |
Current comments:
48 | 49 |Add a new comment:
50 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /owasp.sql: -------------------------------------------------------------------------------- 1 | 2 | 3 | SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; 4 | SET time_zone = "+00:00"; 5 | 6 | 7 | 8 | 9 | CREATE TABLE IF NOT EXISTS `comments` ( 10 | `id` int(11) NOT NULL AUTO_INCREMENT, 11 | `comment` text NOT NULL, 12 | PRIMARY KEY (`id`) 13 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=14 ; 14 | 15 | 16 | 17 | CREATE TABLE IF NOT EXISTS `cookies` ( 18 | `id` int(11) NOT NULL AUTO_INCREMENT, 19 | `cookie` text NOT NULL, 20 | PRIMARY KEY (`id`) 21 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=9 ; 22 | 23 | 24 | 25 | CREATE TABLE IF NOT EXISTS `portfolios` ( 26 | `id` int(11) NOT NULL, 27 | `symbol` char(8) NOT NULL, 28 | `shares` int(11) NOT NULL, 29 | PRIMARY KEY (`id`,`symbol`) 30 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 31 | 32 | 33 | 34 | INSERT INTO `portfolios` (`id`, `symbol`, `shares`) VALUES 35 | (1, 'AAPL', 100); 36 | 37 | 38 | 39 | CREATE TABLE IF NOT EXISTS `test` ( 40 | `id` int(11) NOT NULL AUTO_INCREMENT, 41 | PRIMARY KEY (`id`) 42 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; 43 | 44 | 45 | 46 | CREATE TABLE IF NOT EXISTS `users` ( 47 | `id` varchar(15) NOT NULL, 48 | `pwd` varchar(15) NOT NULL, 49 | PRIMARY KEY (`id`) 50 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 51 | 52 | 53 | INSERT INTO `users` (`id`, `pwd`) VALUES 54 | ('alain', 'abc123'), 55 | ('chris', 'password'), 56 | ('david', 'secret'), 57 | ('peter', 'qwerty'), 58 | ('jay', 'test123'), 59 | ('spyros','owasp'); 60 | --------------------------------------------------------------------------------