GithubHelp home page GithubHelp logo

aleemalvi / assignment2 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from prog38263/assignment2

0.0 0.0 0.0 75 KB

Vulnerable PHP Blog App

Shell 0.69% JavaScript 2.89% PHP 46.32% CSS 29.85% Hack 19.35% Dockerfile 0.89%

assignment2's Introduction

PROG38263 - Assignment 2

Fixing and Insecure PHP Blog Application

Description

For this assignment you will work alone or with a classmate to identify and exploit vulnerabilities in an insecure blog application. After that you will add and test security controls to mitigate or prevent the vulnerabilities from being exploited.

The web application’s technology stack is PHP, Nginx and PostgreSQL. The application is provided via Github and can be built/launched with docker-compose build && docker-compose up. For convenience, there is also a container provided for exploring the database. It can be accessed by navigating to the application in a web browser on port 8080. Use the credentials for the postgres user found in config.php to login to the database from the web interface.

If you want to add more initial data, you can add insert statements to the data.sql script. The database schema will be created and populated from the script when you first build the application. To completely reset the database you will need to remove the docker container that holds the data volume for the database.

Vulnerabilities

The application has the following known vulnerabilities that you must find and exploit.

  • Cross-Site Scripting (XSS)
  • SQL Injection
  • Broken Access Control (i.e. you can do things without authenticating that you should be able to do) Missing role-based access control enforcement and management (i.e. Blog authors should only be able to delete their posts. Admins can delete anyone’s posts. There is currently no mechanism for changing or managing the roles for users. Actually, there is no mechanism for even creating or managing users without issuing manual SQL against the database).
  • Insecure password handling and storage.
  • CSRF
  • The entire website, including the login page, is served over plaintext HTTP.
  • The web application has no logging except for the default logs generated by Nginx.
  • The website only uses single-factor authentication.

Objectives

  • For the vulnerabilities described above, find and exploit at least one instance of that vulnerability.
  • Provide proof of your exploit through screenshots or tool output.
  • Write a sentence describing the severity and impact of the vulnerability.
  • Implement the most appropriate security control for that vulnerability.

Bonus Objectives!

  • Implement database caching using memcachd.
  • Implement persistent session management using redis.
  • Allow Articles to be written using either some simple HTML formatting tags (like h1, ol, strong, etc) or Markdown but still prevent the use of malicious JavaScript in articles.

assignment2's People

Contributors

prog38263 avatar nickcjohnston avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.