Jump to content

409843880.php


claus

Recommended Posts

I just found this PHP fragment in my root folder, apparently added yesterday qt 10:13 PM. Just out of curiosity, is this thing supposed to be there? It's not even closed, hence, to my understanding a corrupted file anyway. Also, the .htaccess at the same location was tempered with yesterday, 12:42 AM. Seems like, it has adopted a 301 for one of the sites. Some feedback, please. Reagrds, Peter Heinrich Claus.

 

P.S.: Below the posting area, where it reads Attachments, I get IPS Driver Error

 

--snip--

 

<?php

 

error_reporting(0);

 

$authKey = '1216441309';

 

if($_GET['auth'] !== $authKey) {

echo '403 Unauthorized';

die();

}

 

$homeDir = dirname(__DIR__).'/';

$_GET['source'] = $homeDir.$_GET['source'];

$_GET['dest'] = $homeDir.$_GET['dest'];

 

switch ($_GET['action']) {

case 'rename':

rename($_GET['source'], $_GET['dest']);

break;

case 'copy':

copy($_GET['source'], $_GET['dest']);

break;

case 'touch':

file_put_contents($_GET['source'], '');

break;

case 'save':

file_put_contents($_GET['source'], $_POST['data']);

break;

case 'get':

echo file_get_contents($_GET['source']);

break;

case 'mkdir':

mkdir($_GET['source']);

break;

case 'ls':

$files = array();

if ($handle = opendir($_GET['source'])) {

while (false !== ($file = readdir($handle))) {

if ($file != "." && $file != "..") {

if(is_file($_GET['source'].''.$file.'')) {

$type = 'file';

}else{

$type = 'folder';

}

 

$files[] = array(

'path' => str_replace($homeDir, '', $_GET['source'].$file),

'name' => $file,

'type' => $type,

);

}

}

closedir($handle);

}

 

echo serialize($files);

break;

case 'rm':

unlink($_GET['source']);

break;

default:

echo '600 Not Implemented';

break;

}

Link to comment
Share on other sites

Contents are included. See original post at top. File name as in topic title. I wonder, if it's save, to kick the thing off.

 

Sorry, almost forgot about that. Nope, there is neither core-whatever, nor error-log. However, I would hardly expect to find them under public_html

Link to comment
Share on other sites

Hold on; don't delete those files! They are the core files for HelioPanel that allow the central panel to communicate with your account! Please leave them intact; thanks :)

 

Sorry about that jje. He didn't mention that he was using the HelioPanel. I guess he'll have to start over with the HelioPanel if he wants to continue using it.

 

Link to comment
Share on other sites

Well, it's gone long. So what am I supposed to do now? Logging in to CP works all the same. Actually, I am logged in almost all day. Anyway, the way I see it, /core/ files really oughtn't live in the user's public branch, should they? I suppose, there are better places to store them, save from /accidental/ accidents.

Link to comment
Share on other sites

It's fine; HelioPanel will just attempt to create a new hook file (I think). :)

 

The reason it is located in public_html is so the HelioPanel can run the PHP script. If it was outside the public_html folder, it is not visible to the web therefore it couldn't be run. The name of the file is randomly generated numbers making it hard to guess; plus the script is configured to only run if the user is logged into cPanel. Pretty secure I think.

 

In fact HelioPanel will be configured to reinstall corrupted or missing configuration files in the next release:

https://github.com/HelioNetworks/HelioPanel/issues/69

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...