ghost👻sonofabot-sec:~#

I scan, I map, I exploit .... Ghost is in your shell!!!

View on GitHub

Hacker

Screenshot_20221005_235811

Hacker Sounds badass right ? yep it is but this was quite easy Heading onto the website we were greeted with a website and all it does is to upload a file

Screenshot_20221005_173656

File upload vulnerabilities are when a web server allows users to upload files to its filesystem without sufficiently validating things like their name, type, contents, or size. Read more here file upload vulnerability

Screenshot_20221005_173759

Here there are filters such as file type and size

Let’s dive into it my payload was really tiny(typing it out will mess up my md file)

Screenshot_20221005_173857

AAAA<?=$_GET[0]?>

saving that and then checking the file type we see it’s ascii text

Screenshot_20221005_174149 Screenshot_20221005_174247

Now we edit the hex character to that of a jpeg

Screenshot_20221005_173945 Screenshot_20221005_174308

checking the file type again we see it has changed

Screenshot_20221005_174317 Screenshot_20221005_174408

So now we upload our shell

Screenshot_20221005_175022

While it’s possible to guess the file path running a directory fuzzing helps know the files and directories on the web server

Screenshot_20221005_175800 Screenshot_20221005_235955

running curl does the same thing

Screenshot_20221006_001130

It did take a while finding our flag but yh we did find it in upload.php

Screenshot_20221005_235542

So that’s that



Back To Home