Git Product home page Git Product logo

sharn-web-desktop's Introduction

SHARN Web Desktop

A Simple CTF Challenge that expects user to see Client Side Login Algorithm, Path Traversal and Command Injection.

Requirements

Language Used = Python3
Modules/Packages used:

  • os
  • flask

Install the dependencies:

pip install -r requirements.txt

Setup

  • Add Part 1 of the Flag in /etc/passwd (for Path Traversal)
echo part_1_of_the_flag >> /etc/passwd
  • Add Part 2 of the Flag in Environment Variables (for Command Injection)
export flag_part_2="part_2_of_the_flag"

Solution

  • After seeing Robot on Index page, we head to /robots.txt
  • There are 2 Routes listed there
    • /remote_file_access_login: Login Route
    • /parts: Gives us hints where the parts of the Flags are stored
  • After going to /remote_file_access_login, we find the login logic in the JavaScript Code. We get the following Credentials for login:
    • User: kaptaan
    • Password: main_daku_ek_number_da_han
  • After Login, we see list of Files
  • After selecting 1 file, we get to know that it sends a get request to /getFileContent with parameter file
  • Here file is vulnerable to Path Traversal and Command Injection.
  • We do Path Traversal to /etc/passwd to get the First Part of the Flag.
  • We do Command Injection to get the Environment Variables, which gives us the second part of the Flag.

sharn-web-desktop's People

Contributors

gill-singh-a avatar

Watchers

 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.