Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7820639
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T07:22:36+00:00 2026-06-02T07:22:36+00:00

I have a website where users can upload files to share with others. But

  • 0

I have a website where users can upload files to share with others. But first I need to verify them.
Lately someone uploaded a .php file with the following commands:

‰PNG

<?php
eval(gzinflate(base64_decode("very large strings of characters")));

?>

I figured it might be harmful, so I didnt open it.

Does anyone have any idea what it does?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T07:22:38+00:00Added an answer on June 2, 2026 at 7:22 am

    Seems like the attacker’s code was base64 encoded and gzipped.

    So first the code is decoded from base64 encoding, and then it is unzipped basically until a string of code.

    And then eval is called on the resulting string, which will execute the code that has been decoded and unzipped.

    But without seeing what code gets generated, it is hard to say what it will do when the code is run.


    I decoded the encoded text. Using the following approach

    (I guess writing to file was a bad idea now that I think of it. Mainly if you’re on Windows. I guess it is a bit safer on Linux with the execute bit turned off. So I was kind of lucky in this case!)

    <?php
    $test = gzinflate(base64_decode("encoded_text"));
    $myFile = "testFile.txt";
    $fh = fopen($myFile, 'w');
    fwrite($fh, $test);
    fclose($fh);
    

    I wrote the output to file just in case there was some random html or javascript that could infect my computer if I just echoed it to my browser. That may be why you got an anti-virus warning.

    I’m not sure what it does yet.


    Just skimming through the code, which is like 4,750 lines of code, it seems like it sets up Basic Auth. And then there’s a lot of database functions and some basic html interface. This in PHP. There’s also some perl too. Near the end.

    Basically what it seems to do is this: Every page where that image is displayed it will output parts of that code and execute it along with your code, and it will try to get input data, or try to find session data and or database values.

    Then other parts of the code basically create an admin interface when the url is visited like this: url?admin=1, which brings up a Basic Auth authentication. And then there is an simple interface phpmyadmin like interface where the user can try out different queries and gather out metadata about your db. Probably other stuff run to exec, etc too.

    I could be wrong, but that’s the gist I get from going through the code.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a website where users can upload their files; these are stored on
I have a website where the users can upload an image. However, before they
I have a website were users can create a profile and upload an image
I have a Silverlight 4.0 website where users can upload images. (Users have to
I'm looking into a system where users can upload xml files to a website
Ok, So, I have a social networking website where users can share a post
I have website where users can login with their Facebook account. I am using
I have a website for dance academy where Users can register and add/drop dance
I have multiple themes on my website and users can just switch between multiple
I want to create a website with various users. The users can have different

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.