Git Product home page Git Product logo

globitek_week4's Introduction

globitek_week4

Project 4 - Forgery, Theft, and Hijacking Prevention

Time spent: X hours spent in total

User Stories

The following required functionality is completed:

Still working on the project but pushing it in github for tonight. Thanks.

1. [x] Required: Test for initial vulnerabilities

2. [ ] Required: Configure sessions

  • Required: Only allow session IDs to come from cookies
  • Required: Expire after one day
  • Required: Use cookies which are marked as HttpOnly

3. [ ] Required: Complete Login page.

  • Required: Show an error message when username is not found.
  • Required: Show an error message when username is found but password does not match.
  • Required: After login, store user ID in session data.
  • Required: After login, store user last login time in session data.
  • Required: Regenerate the session ID at the appropriate point.

4. [ ] Required: Require login to access staff area pages.

  • Required: Add a login requirement to almost all staff area pages.
  • Required: Write code for last_login_is_recent().

5. [ ] Required: Complete Logout page.

  • Required: Add code to destroy the user's session file after logging out.

6. [ ] Required: Add CSRF protections to the state forms.

  • Required: Create a CSRF token.
  • Required: Add CSRF tokens to forms.
  • Required: Compare tokens against the stored version of the token.
  • Required: Only process forms data sent by POST requests.
  • Required: Confirm request referer is from the same domain as the host.
  • Required: Store the CSRF token in the user's session.
  • Required: Add the same CSRF token to the login form as a hidden input.
  • Required: When submitted, confirm that session and form tokens match.
  • Required: If tokens do not match, show an error message.
  • Required: Make sure that a logged-in user can use pages as expected.

7. [ ] Required: Ensure the application is not vulnerable to XSS attacks.

8. [ ] Required: Ensure the application is not vulnerable to SQL Injection attacks.

9. [ ] Required: Run all tests from Objective 1 again and confirm that your application is no longer vulnerable to any test.

The following advanced user stories are optional:

  • Bonus Objective 1: Identify security flaw in Objective #4 (requiring login on staff pages)

    • Identify the security principal not being followed.
    • Write a short description of how the code could be modified to be more secure.
  • Bonus Objective 2: Add CSRF protections to all forms in the staff directory

  • Bonus Objective 3: CSRF tokens only valid for 10 minutes.

  • Bonus Objective 4: Sessions are valid only if user-agent string matches previous value.

  • Advanced Objective: Set/Get Signed-Encrypted Cookie

    • Create "public/set_secret_cookie.php".
    • Create "public/get_secret_cookie.php".
    • Encrypt and sign cookie before storing.
    • Verify cookie is signed correctly or show error message.
    • Decrypt cookie.

Video Walkthrough

Here's a walkthrough of implemented user stories:

Video Walkthrough

GIF created with LiceCap.

Notes

Describe any challenges encountered while building the app.

License

Copyright [2017] [Promila Agarwal]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

globitek_week4's People

Contributors

promila3 avatar

Watchers

James Cloos avatar  avatar

globitek_week4's Issues

Project Feedback!

Hello Promila,

Looks like you haven't pushed on github big amount of the required files and the majority of required features. Once you've completed the requirements, please push your updates, update your README , update your gif and submit your assignment again so we can regrade it.

Whenever you make updates to your project that require re-grading, you need to re-submit your project using the submit button on the associated assignment page in the course portal. This will flag your project as “updated” on our end and we know to re-grade.

You should re-submit your assignment anytime you:

  • Update a previously incomplete assignment
  • Add optional and additional features to an already completed assignment

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.